I am exactly a beginner of php. This question may be easy.
I have a php program which want to achieve the url from browser.
e.g. webmail.xxx.com
then how the index.php is able to know it is xxx.com ??
which function in php can do so??
--
PHP General Mailing List (http://www.php.net/)
To
you mean redirect?
header(Location: www.stuff.com);
make sure it goes before any output to screen or html tags or it won't
work,
I am exactly a beginner of php. This question may be easy.
I have a php program which want to achieve the url from browser.
e.g. webmail.xxx.com
then how the
in the middle is... If you need help doing that just post again :)
Andrew
- Original Message -
From: php @ banana [EMAIL PROTECTED]
To: PHP-GENERAL [EMAIL PROTECTED]
Sent: Sunday, August 04, 2002 8:19 AM
Subject: Re: [PHP] which function can do so ?
you mean redirect?
header(Location
Have a look at the predefined variables in PHP... particularly the $_SERVER
array.
http://www.php.net/manual/en/reserved.variables.php#reserved.variables.serve
r
I think you'll want $_SERVER['HTTP_HOST'], but it will depend on your PHP
version, server environment, etc etc.
Justin French
on
4 matches
Mail list logo