note 35702 deleted from function.file-get-contents by vincent
| From: | vincent@php.net | Date: | Thu, 11 Sep 2003 14:47:57 +0000 |
| Subject: | note 35702 deleted from function.file-get-contents by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56154@lists.php.net to get a copy of this message | ||
Note Submitter: toby dot beresford at microaid dot net
----
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.