PHP function for getting file size and loading time for a page

别说谁变了你拦得住时间么 提交于 2019-12-06 16:46:19

For the filesize.

  • Create a loop to read all files in a specific directory with dir.
  • Then for each file use filesize.

Loadtime Loadtime depends on the connection speed and the filesize. And I see that you specify that you are reading locally the files. You can detect how much time it take you to read those files but this will not be the loadtime for the page for an external user.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!