note 3719 deleted from include by jimw

From: Date: Thu, 11 Jan 2001 03:18:23 +0000
Subject: note 3719 deleted from include by jimw
Groups: php.notes 
Request: Send a blank email to php-notes+get-9631@lists.php.net to get a copy of this message
[Editor's note: see the output buffering functions] One of the problems I've struggled with for a long time was sending a header *after* I included a file: <PRE> include("somthing.php"); header("Location: something_else.php"); </PRE> This never worked for me, but it does work if you wrap the include in an if statement: <PRE> if (include("something.php")) {} header("Location: something_else.php"); </PRE> Now you can include the file AND redirect.

« previous php.notes (#9631) next »