PHP ftp_size() 函数
PHP 教程
· 2019-01-26 13:44:42
定义和用法
ftp_size() 函数返回 FTP 服务器上指定文件的大小。
该函数以字节返回指定文件的大小,如果出错则返回 -1。
语法
ftp_size(ftp_connection,file)
| 参数 | 描述 |
|---|---|
| ftp_connection | 必需。规定要使用的 FTP 连接。 |
| file | 必需。规定要检查的文件。 |
提示和注释
注释:并非所有 FTP 服务器均支持该函数。
实例
<?php
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
echo ftp_size($conn,"test.txt");
ftp_close($conn);
?>
上面的代码将输出:
160
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Web Caching
Duane Wessels / O'Reilly Media, Inc. / 2001-6 / 39.95美元
On the World Wide Web, speed and efficiency are vital. Users have little patience for slow web pages, while network administrators want to make the most of their available bandwidth. A properly design......一起来看看 《Web Caching》 这本书的介绍吧!