note 35702 added to function.file-get-contents

From: Date: Thu, 11 Sep 2003 14:45:03 +0000
Subject: note 35702 added to function.file-get-contents
Groups: php.notes 
Request: Send a blank email to php-notes+get-56152@lists.php.net to get a copy of this message
Correction to code snippet below: $myfile = implode(file("http://www.myfile.com/file.txt"),"\n"); Implode requires a second argument. ---------------- 17-Jul-2003 01:41 For earlier php versions you can also easily implode a file() array. Code: $myfile = implode(file("http://www.myfile.com/file.txt")); But if the file doesn't exists it will give two errors, one that the file doesn't exists and two that implode has bad arguments to implode. Although i do find it an easy way. ---- Manual Page -- http://www.php.net/manual/en/function.file-get-contents.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35702 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35702&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35702&report=yes

« previous php.notes (#56152) next »