PHP 4.0 Bug #6546 Updated: Header Problem

From: Date: Sat, 10 Mar 2001 03:01:03 +0000
Subject: PHP 4.0 Bug #6546 Updated: Header Problem
Groups: php.dev 
Request: Send a blank email to php-dev+get-48563@lists.php.net to get a copy of this message
ID: 6546 Updated by: sniper Reported By: nymph@innocent.com Old-Status: Duplicate Status: Closed Bug Type: Scripting Engine problem Assigned To: Comments: Previous Comments: --------------------------------------------------------------------------- [2000-09-05 00:27:32] nymph@innocent.com When sending a header after including another file (if the other file does not write anything directly), you will get a header problem even though no headers were actually sent. The connect.php only connects to the database. Nothing else. CODE: <? if (include("include/connect.php")) {} $mysql_connection = mysql_connect($mysql_host,$mysql_user, $mysql_pass); $mysql_query = "SELECT * FROM densetsuFiles WHERE Id = '$id'"; $mysql_result = mysql_db_query($db_name, $mysql_query, $mysql_connection); $row = mysql_fetch_array($mysql_result); if ($row) { header("Location: http://www.domain.com/data/$row[Type]/$row[FileName]"); end; } else { $error = "File Not Found"; } ?> Warning: Cannot add header information - headers already sent by (output started at include/connect.php:8) in /usr/home/a01/html/densetsu/downloads.php on line 9 --------------------------------------------------------------------------- ATTENTION! Do NOT reply to this email! To reply, use the web interface found at http://bugs.php.net/?id=6546&edit=2

« previous php.dev (#48563) next »