On Tue, February 6, 2007 7:46 pm, James Lockie wrote:
> I am trying to use this code to display a button at the root but it
> always displays the button. :-(
>
>     if (! (preg_match( "/$\/index.php/", $_SERVER['PHP_SELF'] ))) {

Without any "modifier", $ matches the END of the string.

It is impossible to have the end of the string followed by more stuff.

You maybe meant to add 'm' and or 's' after the ending '/', which
would indicate that you are looking for a newline followed by
'\/index.php' but I doubt that that is what you want either...

I don't think you want the $ in there at all...

Or maybe you want it right before the final '/' to make sure the URL
has nothing else after the 'index.php' part.

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to