php - Creating a ZIP backup file - No errors thrown, but the ZIP file is not showing up -


$path = '/home/username/www/;  if($zip = new ziparchive){     if($zip->open('backup_'. time() .'.zip', ziparchive::create)){         if(false !== ($dir = opendir($path))){             while (false !== ($file = readdir($dir))){                 if ($file != '.' && $file != '..' && $file != 'aaa'){                     $zip->addfile($path . $file);                     echo 'adding '. $file .' path '. $path . $file .' <br>';                 }             }         }         else         {             echo 'can not read dir';         }          $zip->close();     }     else     {         echo 'could not create backup file';     } } else {     echo 'could not launch zip libary. did install it?'; } 

hello again stackoverflow! want backup folder content including (empty) subfolders , every file in them, whilst excluding single folder (and ofcourse . , ..). folder needs excluded aaa.

so when run script (every folder have chmod 0777) runs without errors, zip file doesn't show up. why? , how can solve this?

thanks in advance!

have tried access zip folder via php rather looking in ftp whether exists or not - might not appear view in ftp


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -