note 44155 deleted from function.file-get-contents by aidan

From: Date: Fri, 16 Jul 2004 10:31:35 +0000
Subject: note 44155 deleted from function.file-get-contents by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73369@lists.php.net to get a copy of this message
Note Submitter: luke at hpad dot com ---- // 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; }

« previous php.notes (#73369) next »