Unzip Code PHP error -


i have these lines of code upload unzip file. can upload file, cannot unzip it. doing in localhost in meantime. appreciated. thanks. have folders zipfiles , unzipfiles.

//upload file if(isset($_post['submit'])){     $file_path = "zipfiles/";     $name       = $_files['uploaded_file']['name'];       $temp_name  = $_files['uploaded_file']['tmp_name'];       $file_path  = $file_path . basename($name);     $files      = pathinfo($file_path,pathinfo_extension);     $file_type  = $_files['uploaded_file']['type'];      $today = date("y-n-j");        if(move_uploaded_file($temp_name, $file_path)) {         echo "success";         $zip = new ziparchive();         $x = $zip->open($file_path);         if ($x === true) {             $zip->extractto("unzipfiles/");              $zip->close();             }     } else{         echo "fail";     }    } 

i tested code , works.

do have permissions read / write in 2 folders?


Comments

Popular posts from this blog

How to check data type in C++? -

javascript - Is getTimezoneOffset() stable during daylight saving transition? -

sql server - SQL Query returns one result, does not return 0 or NULL result -