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

php判断目录下的文件是否存在

2025/9/9 10:56:25发布23次查看
求助php判断目录下的文件是否存在
刚刚接触php,求助大家怎么在php中判断某个目录下的文件是否存在?
这个我执行有错误。麻烦大家帮看看,先谢谢各位了。
$file = ../language/$yy.php;
if (is_file($file) == false) { 
  require(../language/$yy.php); } 
else {
  require(../language/m.php); }
 clearstatcache();
------解决方案--------------------
php code $filename = ../language/$yy.php;if (file_exists($filename)) { //do some thing} else { //do other thing}

该用户其它信息

VIP推荐

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