note 44155 added to function.file-get-contents

From: Date: Fri, 16 Jul 2004 09:02:49 +0000
Subject: note 44155 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-73356@lists.php.net to get a copy of this message
// check to see if (phpversion() < 4.3) // before declaring this function function file_get_contents($fileName, $use_include_path=0) { // Check file is readable if (! is_readable($fileName)) return false; $s = ''; // Open pointer to file if (($fp = @fopen($fileName, 'rb', $use_include_path)) === false) return false; // Read bytes from file while (! @feof($fp)) $s .= @fread($fp, 1024); // Close file @fclose($fp); return $s; } ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+44155 Delete -- http://master.php.net/manage/user-notes.php?action=delete+44155&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+44155&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#73356) next »