RE: [PHP] Re: help using ereg_replace()
I own and have read "Mastering Regular Expressions" (excellent book). I've programmed perl for 3 years and have recently started migrating one of my projects into php. I can't stand ereg, I prefer preg. While functions such as substitute and match differ in syntax from perl to php, this book will teach you quite a bit about how to effectively use preg, which i've found to be easier, and faster than ereg. For the record, I like perl's syntax better... ;p Hope this helps, /bart -Original Message- From: Erik Price [mailto:[EMAIL PROTECTED]] Sent: Monday, January 14, 2002 11:26 AM To: liljim Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Re: help using ereg_replace() liljim, Thanks for the advice (and especially the explanation!) -- I note that you chose the Perl regexp engine rather than the "e" regexp engine (POSIX?). Quite a few people recommended O'Reilly's "Mastering Regular Expressions" over the weekend. Does anyone know if it covers the Perl syntax*? This seems like a good book to learn more. Erik * I don't know Perl On Monday, January 14, 2002, at 11:11 AM, liljim wrote: > I would use preg_replace to do this. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] How to protect JavaScript?
This would only be true if your javascript files were parsed with php. If not, then php can't do anything about it of course. Look into mod_rewrite. I haven't used it in the sense that you're looking for, but I don't see why you couldn't. http://httpd.apache.org/docs-2.0/misc/rewriteguide.html /bart -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 9:29 AM To: [EMAIL PROTECTED] Subject: [PHP] How to protect JavaScript? Hello! I want to protect a JavaScript: It should only be readable out of the document, where it is included (with
RE: [PHP] How to protect JavaScript?
Here's a good primer on mod_rewrite: http://www.freebsddiary.org/rewrite.php I used it to accomplish the following... A user hits a url of say: http://foo.com/84838 I then want to return an object out of our database who's id is 84838. A 404 handler will not help in this case. So, I chose to use mod_rewrite. Anytime /\d+$ is requested, I use mod rewrite to redirect to a php page that fetches the object. Thus a request for: http://foo.com/84838 redirects to: http://foo.com/object?id=84838 The user does not see the redirect, their url will remain "http://foo.com/84838";. Check out the primer above, it's pretty straght-forward. /bart -Original Message- From: Martin Thoma [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 16, 2002 9:47 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] How to protect JavaScript? Hi Bart, thanx for your answer. > This would only be true if your javascript files were parsed with php.If > not, then php can't do anything about it of course. This is possible, I tried it out. > Look into mod_rewrite. I > haven't used it in the sense that you're looking for, but I don't see why > you couldn't. > > http://httpd.apache.org/docs-2.0/misc/rewriteguide.html This is a lot of stuff... Could you give me a hint where the way leads to? Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] RTFM
> no such thing as a stupid question... I strongly disagree. Refer to the topic: "RTFM". A stupid question is one that is posted to this message board before the poster bothers to do a shred of independent thinking. I've seen way too many of these questions come through this list. The MySQL list was about the same. It was more of a bother to read than it was a benefit. This list is about the same quality. Every once in a long while something useful comes along, but unfortunately their burried underneath 100 other postings of lazy newbies asking questions like *scrolls about 10 messages down* "How to send url on if statement". 1) if statements are surely covered on php.net 2) It is not a php-specific question 3) If you don't understand how "if statements" work, use that 8lb mass on your shoulders - RTFM Just my $0.02 USD. /bart -Original Message- From: Andrew [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 4:49 PM To: Nick Wilson; [EMAIL PROTECTED] Subject: RE: [PHP] RTFM Nick My personal feelings on this is that there is no such thing as a stupid question... sometimes what you might find the simplest if things becomes very difficult for another person to grasp! If you do not like the emails that people post... use the delete button! Andrew -Original Message- From: Nick Wilson [mailto:[EMAIL PROTECTED]] Sent: Friday, January 18, 2002 4:26 PM To: [EMAIL PROTECTED] Subject: [PHP] RTFM -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, just a very quick note: I've been following the list for about a week and I probably follow one or two threads a day. Some of the stuff here is *very* interesting. Unfortunately most of the stuff posted is a little ridiculous in that it's posted by people that clearly don't know where the online manual is located. Don't get me wrong, I'm no expert and I don't object to the 'I had a look but...' posts I just think the list might be a little more interesting if those that *really* know there stuff stopped giving detailed answers to Q's like 'my html page shows the php code' and were just a little less tolerant. Feel free to fry me. - -- Nick Wilson Tel:+45 3325 0688 Fax:+45 3325 0677 Web:www.explodingnet.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8SJLTHpvrrTa6L5oRAg8SAKCLzzFk6i29BzABak9ezbtsVIIw9wCgnn4o +Evq2JM0f2FDj1O1WEvm82o= =NaDy -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]