您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

PHP 获取远程文件大小的3种解决方法_PHP教程

2024/3/22 4:37:22发布22次查看
1、使用file_get_contents()
复制代码 代码如下:
2. 使用get_headers()
复制代码 代码如下:
ps:
需要打开allow_url_fopen!
如未打开会显示
warning: get_headers() [function.get-headers]: url file-access is disabled in the server configuration
3.使用fsockopen()
复制代码 代码如下:
http://www.bkjia.com/phpjc/328048.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/328048.htmltecharticle1、使用file_get_contents() 复制代码 代码如下: ?php $file = file_get_contents($url); echo strlen($file); ? 2. 使用get_headers() 复制代码 代码如下: ?php $header_...
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product