Re: [php] How to get request url string and server hostname
| From: | 1LT John W. Holmes | Date: | Tue, 25 Jun 2002 19:08:36 +0000 |
| Subject: | Re: [php] How to get request url string and server hostname | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-103820@lists.php.net to get a copy of this message | ||
A combination of $_SERVER['SERVER_NAME'], $_SERVER['SCRIPT_NAME'], and
$_SERVER['QUERY_STRING'] should get you what you want.
Check out a phpinfo() page for more variables, or do a print_r($_SERVER);
---John Holmes...
----- Original Message -----
From: "Harriet Xing" <hxing@iitedge.com>
To: <php-general@lists.php.net>
Sent: Tuesday, June 25, 2002 2:56 PM
Subject: [PHP] [php] How to get request url string and server hostname
Hi,
Would anyone know how to get the http request url string in php?
i.e., if the request is "http://www.myserver.com/test.php?param1=123",
how
can I obtain this string in test.php?
Thank you,
Harriett
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php