note 36305 added to function.file
| From: | austin at rn2 dot php dot net | Date: | Sat, 04 Oct 2003 13:01:33 +0000 |
| Subject: | note 36305 added to function.file | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-57803@lists.php.net to get a copy of this message | ||
an even better way to find a file size:
file() puts a file into an array.
file_get_contents() puts an entire file into a string.
file_get_contents() only works with Versons >=PHP4.3.0
For the actual documentation, the link is below.
<?php
$myurl = "http://www.php.net/file-get-contents";
$mysize = file_get_contents($myurl);
$mysize = strlen($mysize);
print $mysize;
?>
----
Manual Page -- http://www.php.net/manual/en/function.file.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+36305
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+36305&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+36305&report=yes
Search Tool -- http://master.php.net/manage/user-notes.php