i have problem script. when unzip use tis script
if (file_exists($zipfile)) { $zip = new ziparchive; if ($zip->open($zipfile) === true) { if ($zip->extractto($path) === true) return 'file extracted'; else return 'cant extract'; $zip->close(); } else { return 'cant open file 2'; } } else { return 'zip doesnt exist'; }
i can't delete extracted file use ftp. folder($path) have chmode 777 when try delete extracted file use ftp see message permission denied if upload files folder use ftp can delete file
as dahaka said, zip-close();
never called, either return 'file extracted' or 'cant extract' before reaching zip-close();
, exiting method. should make zip-close();
come before returns in code
Comments
Post a Comment