开发者

php : get tmp size

开发者 https://www.devze.com 2023-01-24 11:27 出处:网络
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 a

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消