开发者

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()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜