Date: 04/28/98
- Next message: Bug Database: "[PHP-DEV] Bug #322 Updated: Header function works not correctly if include file contains trailing lines"
- Previous message: johnhowe <email protected>: "[PHP-DEV] Bug #324: Compile fails during php module build"
- In reply to: andreas.schmitter <email protected>: "[PHP-DEV] Bug #322: Header function works not correctly if include file contains trailing lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
It's not a bug. Newlines outside the PHP code block will be sent as-is to
the browser as HTML, first triggering the HTTP header. After the HTTP
header is sent, you can't use the header() function anymore.
Zeev
On 28 Apr 1998 andreas.schmitter <email protected> wrote:
> From: andreas.schmitter <email protected>
> Operating system: AIX
> PHP version: 3.0 Release Candidate 4
> PHP Bug Type: Other
> Bug description:
> Description:
> If an include file contains a trailing line the
> function header("Location: xyz.html") does not redirect
> to the page xyz.htm
> --------------------------------------------------------
> test.php3
> <?
> include("./globals.inc");
> $str=" xxx ";
> $x=remove_spaces($x);
> header("Location: xyz.html");
> ?>
> --------------------------------------------------------
> globals.inc:
> <?
> function remove_spaces($str) {
> $str=ereg_replace("^ *","_",$str);
> $str=ereg_replace(" +$","_",$str);
> return $str;
> }
> ?>
>
> ------------------------------------------------------
> ./configure --with-apache=/u/users/zue/src/apache_1.2.6_php3 --with-oracle=/home
> /oracle/product/7.3.2.2 --with-config-file-path=/u/users/zue/www/httpd_8083/etc
> --enable-debug=no
> -------------------------------------------------------
> Additional Oracle Support (sql-based interface)
>
-- ----------------------------------------------------- Zeev Suraski <zeev <email protected>> For a PGP public key, finger bourbon <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #322 Updated: Header function works not correctly if include file contains trailing lines"
- Previous message: johnhowe <email protected>: "[PHP-DEV] Bug #324: Compile fails during php module build"
- In reply to: andreas.schmitter <email protected>: "[PHP-DEV] Bug #322: Header function works not correctly if include file contains trailing lines"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

