note 83971 deleted from function.header by danbrown

From: Date: Sun, 07 Dec 2008 17:59:32 +0000
Subject: note 83971 deleted from function.header by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-147796@lists.php.net to get a copy of this message
Note Submitter: kc8yds at gmail dot com ---- 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.

« previous php.notes (#147796) next »