how to get tmp size
my code
filesize('/tmp/phpn3jaaQ');
error
PHP开发者_如何学运维 Warning: filesize() [function.filesize]: SAFE MODE Restriction in effect. The script whose uid is 524 is not allowed to access /tmp owned by uid 0 in /home/script/file.php on line 2
You can't use file handling / management functions in safe mode for files not owned by the same UID as the script.
Turn off safe mode and your code should work.
Edit: Clarified previous statement regarding file handling.
Another note, safe mode is deprecated as of PHP 5.3, meaning it will not be available in a future version. You should avoid using it and certainly not rely on it.
精彩评论