|
Posted by Kim Andrι Akerψ on 02/01/07 15:52
Eric Layman wrote:
> Hi,
>
> According to the PHP documentation:
>
> it stated that as of php5, filesize supports the reading of remote
> html files:
>
> http://php.net/manual/en/function.filesize.php
>
> But I have tried the following:
> echo filesize("http://www.yahoo.com/");
>
> It returned me this error:
>
> Warning: filesize() [function.filesize]: stat failed for..blah blah
>
> Anyone have this same problem?
>
> Yes. Im using PHP5
It also says in the manual (you have to read it carefully):
> As of PHP 5.0.0 this function can also be used with *some* URL
> wrappers. Refer to Appendix M for a listing of which wrappers support
> stat() family of functionality.
To summarize, these wrappers support the use of stat():
Filesystem Yes
Socket No
HTTP and HTTPS No
FTP and FTPS Partial [1]
PHP input/output streams php://memory and php://temp only
Compression Streams No [2]
Data (RFC 2397) No
Secure Shell 2 ssh2.ftp only
Audio Streams No
Process Interaction Streams No
http://www.php.net/manual/en/wrappers.php
[1] As of PHP 5.0.0: filesize(), filetype(), file_exists(), is_file(),
and is_dir() elements only. As of PHP 5.1.0: filemtime().
[2] Use the normal file:// wrapper to stat compressed files.
--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
Navigation:
[Reply to this message]
|