note 31314 added to function.file-get-contents

From: Date: Thu, 17 Apr 2003 08:09:15 +0000
Subject: note 31314 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-46722@lists.php.net to get a copy of this message
For somebody's machine running PHP < 4.3.0: you can add this function. It is binary-safe. function file_get_contents($filename) { $fd = fopen("$filename", "rb"); $content = fread($fd, filesize($filename)); fclose($fd); return $content; } -- http://www.php.net/manual/en/function.file-get-contents.php http://master.php.net/manage/user-notes.php?action=edit+31314 http://master.php.net/manage/user-notes.php?action=delete+31314 http://master.php.net/manage/user-notes.php?action=reject+31314

« previous php.notes (#46722) next »