【发布时间】:2020-04-22 18:52:21
【问题描述】:
Warning: filemtime(): stat failed for includes\img\defaultimg.jpg in
我阅读并研究过,但没有发现任何有用的东西
在 php 手册中只这么说:
If PHP's integer type is only 32 bits on your system, filemtime() will fail on files over 2GB with the warning "stat failed". All stat()-related commands will exhibit the same behavior.
但只是 jpg 900k
这是我的代码在 xammp 中运行良好,但在生产中却不行
$dirimg="includes/img/"; //this one also throws warning
$filename = "".$dirimg."".$resultsb['Img'].".jpg"; //the path
if(file_exists ($filename)){ // exists?
$timeimg=filemtime($filename);
$srci="".$dirimg."".$resultsb['Img'].".jpg?=".$timeimg."";
}else{$timeimg=filemtime("includes\img\defaultimg.jpg"); //another path, the file does exists
$srci="includes\img\defaultimg.jpg?=".$timeimg.""; } //
在各自的路径中都抛出相同的警告,文件退出 btw
图片可见, 但我需要知道 当它被修改以便浏览器刷新它时
【问题讨论】:
标签: php