Re: Using $PHP_SELF
| From: | David Otton | Date: | Fri, 01 Aug 2003 03:30:39 +0000 |
| Subject: | Re: Using $PHP_SELF | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157868@lists.php.net to get a copy of this message | ||
On Thu, 31 Jul 2003 15:38:41 -0500, you wrote:
>I am having problems while transfering information to another page. I
>am using $PHP_SELF and I am getting errors here is a bit of code so you
>can see what I am saying:
>
>echo "<a
>href='$PHP_SELF?file=$file&dir=".$mydir."'>$file</a><BR>\n";
>
>This is what the browser is saying...
>Notice: Undefined variable: PHP_SELF in
>c:\inetpub\wwwroot\test\download.php on line 54
>
>I don't know what to do.
either
you have register_globals turned off and should use $_SERVER['PHP_SELF']
or
you are attempting to use $PHP_SELF within a function, without having
declared it global first.
function test() {
global $PHP_SELF;
echo ($PHP_SELF);
}