Re: Output of readfile() not to Standard Output
| From: | Zeev Suraski | Date: | Wed, 01 Nov 2000 19:35:01 +0000 |
| Subject: | Re: Output of readfile() not to Standard Output | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23223@lists.php.net to get a copy of this message | ||
In PHP 4.0, there is, using output buffering:
function get_file_contents($filename)
{
ob_start();
readfile($filename);
$contents = ob_get_string();
ob_end_clean();
return $contents;
}
Zeev
At 21:20 01/11/2000, Stefan Scherf wrote:
Hi All, is there a way to write the output of readfile("very_bit.txt") into a variable, or to another file? fgets() is to slow for our purpose. Thanks Stefan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net-- Zeev Suraski <zeev@zend.com> http://www.zend.com/