Best way to determine if a file is empty (php)?

前端 未结 5 1429
迷失自我
迷失自我 2020-12-01 15:40

I\'m including a custom.css file in my template to allow site owners to add their own css rules. However, when I ship the file, its empty and there\'s no sense loading it if

5条回答
  •  离开以前
    2020-12-01 16:21

    Everybody be carefull when using filesize, cause it's results are cached for better performance. So if you need better precision, it is recommended to use something like:

    More info here

提交回复
热议问题