RE: [PHP] Re: Value for entire file
| From: | Ford, Mike [LSS] | Date: | Fri, 18 Jul 2003 09:13:20 +0000 |
| Subject: | RE: [PHP] Re: Value for entire file | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155744@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Bobby Patel [mailto:anup_patel@rogers.com]
> Sent: 18 July 2003 06:11
>
> it should be in the $_GET or $HTTP_GET_VARS array in the
> index.php script.
> put this at the top of your index.php script
>
> var_dump ($_GET); # or $HTTP_GET_VARS depending on PHP version
>
> and see if the value is there. Also, if you are using the value in a
> function and you have PHP < 4.1.0 (I think), GET array is not
> global so to
> get this value you have to declare the array global
No, $_GET has always been superglobal, it just didn't exist before 4.1.0 -- so for PHP
<4.1.0 it's:
function some_function () {
global $HTTP_GET_VARS;
echo $HTTP_GET_VARS['year'];
}
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211