问题
I am have uploading site and I want to know how i can know the space of the server via php ?
for example:
if($_FILES ...) {
if($server_rest_space enough for the file){
// upload it!
}
else{
echo 'no space on your server enough!'; //there is no space!!
}
important another question if the server is full! and some one uploaded file is there an error will happen ?
thank you
回答1:
Try to use disk_free_space()
来源:https://stackoverflow.com/questions/7199513/how-to-detect-the-server-space-enough-for-the-uploaded-file-or-no