PDA

View Full Version : $php_self


sabret00the
05-21-2004, 10:03 AM
if the url of the page is newthread.php?do=newthread

will a header("location:$PHP_SELF");

return it to "newthread.php?do=newthread" or "newthread.php" :nervous: :ermm: lol

filburt1
05-21-2004, 12:38 PM
The latter, although technically it will be /path/to/current_page.php.

Also, always use $_SERVER['PHP_SELF'] as it is not deprecated.

sabret00the
05-21-2004, 03:23 PM
thanks :)

Natch
05-27-2004, 01:34 PM
In addition - the following may prove useful...

$myCompleteURI = "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];

sabret00the
05-27-2004, 03:11 PM
thanks natch, mucho appreciated :)