Aprire la riga di comando script PHP . Inserisci il seguente codice : 
 
 " class createDirZip estende createZip { 
 
 funzione get_files_from_folder ( $ directory , $ put_into ) { 
 
 if ( $ handle = ( $ directory opendir ) ) { 
 
 mentre (false ! == ( $ file = readdir ( $ handle ) ) ) { 
 
 se ( is_file ( $ directory . $ file ) ) { $ 
 
 fileContents = file_get_contents ( $ directory $ file . ) ; 
 
 $ this-> addFile ( $ fileContents , put_into $ $ file . ) ; ! ' . ' 
 
 } elseif ( $ file = e $ file ! = '..' e is_dir ( $ directory . $ file ) ) $ put_into $ file ' /'); . . 
 
 } 
 
 } 
 
 } 
 
 closedir ( $ handle ) ; 
 
 . } 
 
 } " 
 2 
 Inserisci questo codice per ottenere i file dalla directory e sottodirectory : 
 
 " $ createZip = new . ' themes /'); " 
 3 
 Digitare il seguente codice per creare un oggetto dal proprio interno e di definire la directory di base : 
 
 " $ filename = ' tmp /Archivio.zip '; 
 
 $ fd = fopen ( $ filename , ' wb '); 
 
$ out = fwrite ( $ fd , $ createZip - > getZippedfile ( ) ) ; < br
 fclose > ( $ fd ) ; 
 
 $ createZip - > forceDownload ( $ filename ) ; 
 
 @ unlink ( $ nomefile ) ; ". 
 
 sarà in uscita il file zip. 
 
              
software © www.354353.com