zip file can not open

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

$writezip =newZipArchive; 
if($writezip->open('test.zip')===TRUE){ 
    if($zip->addEmptyDir('newDirectory')){ 
        $writezip->addFile('/path/to/index.txt','newDirectory/newname.txt'); 
        $writezip->close(); 
        echo 'ok'; 
    } 
    else{ 
        echo 'failed to create directory'; 
    } 
} 
else{ 
    echo 'failed'; 
} 

 
 Files are zipped but When I am going to extract files it saying files are corrupted and  I can not open file.
 
Can anyone help?
Using php 5.


      

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux