note 69801 deleted from function.file-get-contents by bjori

From: Date: Mon, 09 Oct 2006 12:00:06 +0000
Subject: note 69801 deleted from function.file-get-contents by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118312@lists.php.net to get a copy of this message
Note Submitter: noreply at cvillemedia dot com ---- This function will implement the functionality of file_get_contents() on PHP<4.3.0: function READ_FILE_CONTENTS($file) { // Wrapper for file_get_contents() with PHP<4.3.0 backwards-compatibility: // © 2006 The Charlottesville Media Group, http://www.cvillemedia.com // Free for unresricted use while this notice remains unchanged. if(!function_exists("file_get_contents"))return file_get_contents($file); $ifile = fopen($file,"r"); $contents = false; if($ifile) while (!feof($ifile)) $contents .= fgets($ifile); fclose($ifile); return $contents; }

« previous php.notes (#118312) next »