wordpress - ZipArchive gives blank screen PHP -
i enabled php_zip.dll in php.ini , shows in phpinfo, ziparchive enabled. next, here code using:
$zipname='exports.zip'; $zip=new ziparchive; $zip->open($zipname, ziparchive::create);
when code reaches point, screen goes blank. there no errors in error log. html supposed show, not. other unessential php commented out. using php 5.2.4 on wordpress 3.9.2 site.
i found solution finding in search engines. instead of using php's ziparchive, used command line winzip. looked this:
$cmd='"c:\winzip-directory\winzip32.exe" -a "c:/zip-directory/exports.zip" "c:/zip-directory"'; exec($cmd);
i still don't know caused problem php's ziparchive, though.
Comments
Post a Comment