note 83971 added to function.header

From: Date: Fri, 20 Jun 2008 23:43:07 +0000
Subject: note 83971 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-140634@lists.php.net to get a copy of this message
if you use php to create custom error pages (such as header('HTTP/1.1 500 Internal Server Error');) Internet Explorer ignores you custom page unless it is at least 512 (or sometimes 1024 bytes) for your custom error page place the following before any page output <?php function padding($html){ return ($padding=1024-ob_get_length())>0 ? str_replace('----',str_repeat('-',$padding+4),$html) : $html; } ob_start('padding') ?> and then place this somewhere within the html error page output <!-- ---- --> that will auto-adjust to pad the file to 1024 bytes to override the default Internet Explorer error pages. ---- Server IP: 208.69.120.35 Probable Submitter: 75.24.27.128 ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- https://master.php.net/note/edit/83971 Del: integrated -- https://master.php.net/note/delete/83971/integrated Del: useless -- https://master.php.net/note/delete/83971/useless Del: bad code -- https://master.php.net/note/delete/83971/bad+code Del: spam -- https://master.php.net/note/delete/83971/spam Del: non-english -- https://master.php.net/note/delete/83971/non-english Del: in docs -- https://master.php.net/note/delete/83971/in+docs Del: other reasons-- https://master.php.net/note/delete/83971 Reject -- https://master.php.net/note/reject/83971 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#140634) next »