file_exists不起作用 [英] file_exists does not work

查看:67
本文介绍了file_exists不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的代码:


if(file_exists($ Fname)){

echo"< td> $ Fname exists< / td> ;" ;;

}其他{

echo"< td> $ Fname不存在< / td>" ;;

}


$ Fname是我试图验证的文件的完整路径。当我运行

脚本时,我得到以下输出:

http:// server1:8080 / images / dwg_images / 5005 / 5005001_.pdf 不存在


如果我剪切并粘贴输出路径,显示文件,确认文件确实存在




我做错了什么?任何帮助将不胜感激。

解决方案

Fname)){

echo"< td>

Fname存在< / td>" ;;

}否则{

echo"< td>

Fname不存在< / td>" ;;

}


This is my code:

if (file_exists($Fname)) {
echo "<td>$Fname exists</td>";
} else {
echo "<td>$Fname does not exist</td>";
}

$Fname is the full path to the file I''m trying to verify. When I run the
script, I get the following output:

http://server1:8080/images/dwg_images/5005/5005001_.pdf does not exist

If I cut-and-paste the output path, the file is displayed, confirming that
the file does exist.

Am I doing something wrong? Any help will be greatly appreciated.

解决方案

Fname)) {
echo "<td>


Fname exists</td>";
} else {
echo "<td>


Fname does not exist</td>";
}


这篇关于file_exists不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆