cvs: phpdoc /en/functions http.xml

From: Date: Tue, 12 Mar 2002 14:38:07 +0000
Subject: cvs: phpdoc /en/functions http.xml
Groups: php.doc 
Request: Send a blank email to phpdoc+get-969342993@lists.php.net to get a copy of this message
hholzgra Tue Mar 12 09:38:07 2002 EDT Modified files: /phpdoc/en/functions http.xml Log: corrected the example in the Location: note regaring absolute URLs and converted it to the new superglobals Index: phpdoc/en/functions/http.xml diff -u phpdoc/en/functions/http.xml:1.37 phpdoc/en/functions/http.xml:1.38 --- phpdoc/en/functions/http.xml:1.37 Tue Mar 12 09:35:02 2002 +++ phpdoc/en/functions/http.xml Tue Mar 12 09:38:07 2002 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.37 $ --> +<!-- $Revision: 1.38 $ --> <reference id="ref.http"> <title>HTTP functions</title> <titleabbrev>HTTP</titleabbrev> @@ -108,14 +108,14 @@ <ulink url="&spec.http1.1;-sec14.html#sec14.30">Location:</ulink> including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use - $HTTP_SERVER_VARS['HTTP_HOST'], $HTTP_SERVER_VARS['PHP_SELF'] + <literal>$_SERVER['HTTP_HOST']</literal>, <literal>$_SERVER['PHP_SELF']</literal> and <function>dirname</function> to make an absolute URI from a relative one yourself: <informalexample> <programlisting> <![CDATA[ -header("Location: http://".$HTTP_SERVER_VARS['HTTP_HOST'] - ."/".dirname($HTTP_SERVER_VARS['PHP_SELF']) +header("Location: http://".$_SERVER['HTTP_HOST'] + .dirname($_SERVER['PHP_SELF']) ."/".$relative_url); ]]> </programlisting>

« previous php.doc (#969342993) next »