faqts : Computers : Programming : Languages : PHP : Common Problems : Errors

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 3 people (100%) answered Yes
Recently 3 of 3 people (100%) answered Yes

Entry

Where can I change the value of the PHP_SELF variable? I get wrong url's w/ $_SERVER['PHP_SELF']

Nov 11th, 2004 14:49
Jrf, jurgen muller, Knud van Eeden, http://nl.php.net/manual/nl/reserved.variables.php


$_SERVER(PHP_SELF) is passed to your script from the calling server, so
either the server is providing you with the wrong information (check the
server set-up) or what you really want is not php_self but some other
variable.

To see what variables your server passes to your script, you can use the
following code:
     print "<pre>";
     print_r ($_SERVER);
     print "</pre>";

Based on the results of that you may be able to select the variable you
want to use.