Page 1 of 1

Alternative to $_SERVER['PHP_SELF']

Posted: Wed Jul 07, 2010 11:25 am
by rhecker
In my forms that post back to themselves, I am considering the following alternative to $_SERVER['PHP_SELF']. Does anyone see a security isse with this? I appreciate any thoughts:

basename(dirname(__FILE__))."/".basename(__FILE__);

Re: Alternative to $_SERVER['PHP_SELF']

Posted: Wed Jul 07, 2010 11:48 am
by kaisellgren
That is fine if it works for you. Good that you are not using PHP_SELF.

Re: Alternative to $_SERVER['PHP_SELF']

Posted: Wed Jul 07, 2010 1:26 pm
by rhecker
Thanks Kai. You're opinion is valuable.