[PHP] Properly formatted ereg??
How would I write an ereg to use the value of $PHP_SELF and look for a distinct folder? For instance. say I have: ereg("^/anythinghere/coverage/anthythinghere.html?", $PHP_SELF || ||| So basically it is looking for the "/coverage/" folder, anything can come before it, and anything after it?? Thanks All!! -- 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] Properly formatted ereg??
ereg("^/anythinghere/coverage/anthythinghere.html?", $PHP_SELF || ||| So basically it is looking for the "/coverage/" folder, anything can come before it, and anything after it?? if (strstr($PHP_SELF, "/coverage/")) { echo "Got it"; } else { die(); // ;) } Jason -- 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] Properly formatted ereg??
strstr($PHP_SELF,"/coverage/") Absolutely no reason to use a regular expression when all you are doing is picking a simple string out of another. -Rasmus On Tue, 10 Apr 2001, Black S. wrote: How would I write an ereg to use the value of $PHP_SELF and look for a distinct folder? For instance. say I have: ereg("^/anythinghere/coverage/anthythinghere.html?", $PHP_SELF || ||| So basically it is looking for the "/coverage/" folder, anything can come before it, and anything after it?? Thanks All!! -- 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]