Anil Kumar Nelakuditi Anil Kumar Nelakuditi - 1 year ago 108
HTML Question

Message to display for zero byte file in PHP

i have 0 byte file (assume anil.txt)under /nrt/www/AAAA/RRRR/ directory.
now i need a Php script where i need to check anil.txt file and if it zero byte files i need to display message.

Answer Source

You should use filesize function. You're a newbie, because of that I am adding the code here but please write some code first next time, than you can ask for our help.

Example code:

    $size = filesize('path/to/your/file');

    if ($size === 0) {
     //do something here
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download