首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >filesize() [function.filesize]:中的LinqBridge.dll的stat失败

filesize() [function.filesize]:中的LinqBridge.dll的stat失败
EN

Stack Overflow用户
提问于 2012-06-22 03:10:29
回答 1查看 10.1K关注 0票数 0

我编写了一个脚本,使用以下选项列出Update目录中的文件:

文件名文件散列文件大小

出现此错误的原因:

代码语言:javascript
复制
Warning: filesize() [function.filesize]: stat failed for LinqBridge.dll in      C:\xampp\htdocs\update.php on line 15

我的php cod:

代码语言:javascript
复制
<?php
  if(isset($_GET['action']) and ($_GET['action']=="list"))
 {
    $myDirectory = opendir("./Update/");
    while($entryName = readdir($myDirectory)) {
$dirArray[] = $entryName;
 }
    closedir($myDirectory);
    $indexCount = count($dirArray);
    sort($dirArray);
   for($index=0; $index < $indexCount; $index++) {
    if (substr("$dirArray[$index]", 0, 1) != "."){
    echo $dirArray[$index]."&nbsp;";
    echo @hash_file('md5',$dirArray[$index])."&nbsp;";
    echo filesize($dirArray[$index])."&nbsp;";
}
 }
 }
  ?>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-06-22 03:15:49

$dirArray中的文件位于不同的目录中。您正在从"./Update/“读取它们,因此当执行文件大小、文件时间、文件时间或wahtever等操作时,您需要以"./Update/”作为前缀。

代码语言:javascript
复制
echo filesize("./Update/".$dirArray[$index])."&nbsp;";
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11145115

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档