I have a problem that has long plagued me:
What is the best way to check if I'm out of space?
I have a file editor application (could apply to anything though).
If the server (Apache on SunOS) is out of diskspace
$fp = fopen($file,'w' );
fwrite($fp,$str ing,strlen($str ing));
fclose($fp);
creates a nice 0-byte file.. no error or anything.
Do I need to write to a test file and check it's filesize first??
There's gotta be a better way.
This is a server where the log files get out of control and that's out
of my jurisdiction.
What is the best way to check if I'm out of space?
I have a file editor application (could apply to anything though).
If the server (Apache on SunOS) is out of diskspace
$fp = fopen($file,'w' );
fwrite($fp,$str ing,strlen($str ing));
fclose($fp);
creates a nice 0-byte file.. no error or anything.
Do I need to write to a test file and check it's filesize first??
There's gotta be a better way.
This is a server where the log files get out of control and that's out
of my jurisdiction.
Comment