JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
moved read_whole_file() to file no file.php. tar.php uses rsync, and supports links
[wfpl.git] / misc.php
index 18a1a41..5678b67 100644 (file)
--- a/misc.php
+++ b/misc.php
 #  along with wfpl; if not, write to the Free Software Foundation, Inc., 51
 #  Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-# This exists because file_get_contents() is not documented well. (It says that
-# the second parameter is optional, but does not specify what happens when you
-# do not pass anything.) And because it's nice to work in PHP4.2
-function read_whole_file($name) {
-       $fd = fopen($name, 'r');
-       if($fd === false) {
-               die("Failed to read file: '$name'");
-       }
-       $file_data = fread($fd, filesize($name));
-       fclose($fd);
-       return $file_data;
-}
-
 function unix_newlines($str) {
        $str = str_replace("\r\n", "\n", $str);
        return str_replace("\r", "\n", $str);