How to detect the server space enough for the uploaded file or no?
开发者_Go百科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
Try to use disk_free_space()
精彩评论