John <jo**@nospam.org> wrote:
Hi all,
I'd like to evaluate dynamicaly the size of a dynamic file.
I use the filesize() function...
this is my code :
$my_size =
filesize(http://localhost/the_file_from_which...t_the_size.php) ;
=> I always get 0 !
Do you have any solution ?
thanks in advance,
<http://php.net/filesize> clearly states:
| *Tip:* As of PHP 5.0.0 this function can also be used with /some/ URL
| wrappers. Refer to _Appendix L_ for a listing of which wrappers support
| *_stat()_* family of functionality.
Now Appendix L on HTTP(S) <http://php.net/wrappers.http>:
| Attribute Supported
| Restricted by allow_url_fopen. Yes
| Allows Reading Yes
| Allows Writing No
| Allows Appending No
| Allows Simultaneous Reading and Writing N/A
| Supports stat() No <-- LOOK HERE!
| Supports unlink() No
| Supports rename() No
| Supports mkdir() No
| Supports rmdir() No
A simple RTFM gives the answer... nice, huh?
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
»What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.«
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle