相关疑难解决方法(0)

PHP中的is_file或file_exists

我需要检查文件是否在指定位置的HDD上($ path.$ file_name).

哪个是is_file()file_exists()函数之间的区别,哪个更好/更快在PHP中使用?

php file exists

113
推荐指数
2
解决办法
5万
查看次数

如何使用PHP检查是否存在远程文件?

我能找到的最好的,if fclose fopen类型的东西,使页面加载非常缓慢.

基本上我要做的是以下内容:我有一个网站列表,我想在他们旁边显示他们的favicon.但是,如果一个站点没有,我想用另一个图像替换它而不是显示损坏的图像.

php testing networking file

83
推荐指数
10
解决办法
14万
查看次数

检查php中是否存在文件

if (!(file_exists(http://mysite.com/images/thumbnail_1286954822.jpg))) {   
$filefound = '0';                         
}
Run Code Online (Sandbox Code Playgroud)

为什么这不起作用?

php file-exists

35
推荐指数
5
解决办法
11万
查看次数

PHP文件是否存在

这是我的代码.

$filename = "$myMedia catalog/category/ $myImage.png";
$filename = str_replace(" ", "", $filename);

if (file_exists($filename)) {
    echo "The file $filename exists";
} else {
    echo "The file $filename does not exist";
}
Run Code Online (Sandbox Code Playgroud)

variable上述输出http://50.87.6.244/~storeupp/media/catalog/category/Game_Used.png存在哪些一样.但是,它说它不存在.

知道为什么吗?

php

5
推荐指数
1
解决办法
3万
查看次数

标签 统计

php ×4

file ×2

exists ×1

file-exists ×1

networking ×1

testing ×1