duanlie7447 2012-10-11 01:58
浏览 328

filesize()没有显示实际大小[重复]

Possible Duplicate:
PHP – get the size of a directory

I have 5 files in a directory and it shows file size = 4096 but when i delete 4 files and there is only 1 file left, it still shows the same size. that is how i am getting the file size

echo filesize("user_files/".$uid."/".$rs['DirectoryName']);
  • 写回答

2条回答 默认 最新

  • dongyue934001 2012-10-11 02:00
    关注

    filesize applied to the directory doesn't give the size of its contents. It returns the size of the filesystem node, which, in your case, takes 4kb. This size depends on the amount of the files in the directory.

    To get the actual size of contents - you need to get the size of each file and summarize it.

    评论

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料