note 14355 deleted from function.header by jimw
| From: | jimw@php.net | Date: | Wed, 31 Oct 2001 22:07:24 +0000 |
| Subject: | note 14355 deleted from function.header by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19801@lists.php.net to get a copy of this message | ||
when using a proxy server (like squid) to improve your site performances you need to add
content-length informations of you page (after giving the right expires and cache-control
informations...).
to do this i use this trick:
------
<?php
ob_start();
?>
<!--- your html code here --->
<?php
$content_length=ob_get_length();
$content=ob_get_contents();
ob_end_clean();
header("Content-length: ".$content_length);
echo $content;
?>
-------------
but i note that ob_get_length() dosn't send the CORRECT length size of my html page.
so my proxy doesn't work correctly...
i hope to find a solution...
bye, alberto.