curt            Fri Dec  9 00:39:19 2005 EDT

  Modified files:              
    /phpdoc/en/reference/http/functions header.xml 
  Log:
  Syntax error in example, and make the example a bit clearer.
  
  
http://cvs.php.net/diff.php/phpdoc/en/reference/http/functions/header.xml?r1=1.27&r2=1.28&ty=u
Index: phpdoc/en/reference/http/functions/header.xml
diff -u phpdoc/en/reference/http/functions/header.xml:1.27 
phpdoc/en/reference/http/functions/header.xml:1.28
--- phpdoc/en/reference/http/functions/header.xml:1.27  Tue Sep  6 11:03:44 2005
+++ phpdoc/en/reference/http/functions/header.xml       Fri Dec  9 00:39:15 2005
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.27 $ -->
+<!-- $Revision: 1.28 $ -->
 <!-- splitted from ./en/functions/http.xml, last change in rev 1.2 -->
   <refentry id="function.header">
    <refnamediv>
@@ -106,9 +106,12 @@
        <programlisting role="php">
 <![CDATA[
 <?php
-header("Location: http://"; . $_SERVER['HTTP_HOST']
-                      . rtrim(dirname($_SERVER['PHP_SELF']), '/\\')
-                      . "/" . $relative_url);
+/* Redirect to a different page in the current directory that was requested */
+$host  = $_SERVER['HTTP_HOST'];
+$uri   = rtrim(dirname($_SERVER['PHP_SELF']);
+$extra = 'mypage.php';
+header("Location: http://$host$uri/$extra";);
+exit;
 ?>
 ]]>
        </programlisting>

Reply via email to