note 3719 modified in include by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 14 Sep 2000 11:57:39 +0000 |
| Subject: | note 3719 modified in include by jmcastagnetto | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4991@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.
http://www.php.net/manual/function.include.php