Jump to content


Photo

Blank $PHP_SELF


  • Please log in to reply
3 replies to this topic

#1 w3sl3y2003

w3sl3y2003
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 17 August 2006 - 11:38 AM

Hi all,

When ever i try to use $PHP_SELF it fails because its empty. register_globals is turned off. What could be the cause of this?

All assistance is appreciated!!

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 17 August 2006 - 11:53 AM

have you defined it? the actual global you are looking for is $_SERVER['PHP_SELF'] so unless you have done...

$PHP_SELF = $_SERVER['PHP_SELF'];

it will fail.
follow me on twitter @PHPsycho

#3 w3sl3y2003

w3sl3y2003
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 17 August 2006 - 12:46 PM

Thanx ToonMariner!!!

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 17 August 2006 - 12:50 PM

take heed, PHP_SELF can be tainted. Use $_SERVER['SCRIPT_NAME'] instead.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users