Headers
| From: | akul at otamedia dot com | Date: | Thu, 22 Jun 2000 17:03:08 +0000 |
| Subject: | Headers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-2659@lists.php.net to get a copy of this message | ||
Hello All,
I am new user of PHP and trying to solve the next problem:
1. For correct page closing in case of errors I am wrote this:
function ErrExit($ErrString)
{
echo $ErrString;
?></page><?
exit;
}
(</page> is not error - I am use preprocessor to separate desing and logic)
2. I want to use this function from non-interfaced pages, used only
for data processing and redirecting. In ASP there is no problems:
Response.Buffer=True, but PHP havn't buffering.
3. So I need the function to determine, whether the header is sent
already or not, and write out a page header if need. Like this:
function ErrExit($ErrString)
{
if(header_ok_to_sent())
{
?><page title="Error"><?
}
echo $ErrString;
?></page><?
exit;
}
In manual and FAQ I can't find solution.
--
Best regards,
akul mailto:akul@otamedia.com