![]() If($zip->open($direct. In the right-click menu, click on the Compress option. Rename the folder to whatever you want the ZIP file to be named. Put all these files into a new folder to go on. $zipname = "RosenData".date("mdy-Hi").".zip" Open Finder and search all the files/folders you want to zip firstly. Here is the PHP code section making the zip file: if(extension_loaded('zip')) rw-+ 1 _0: user:_www inherited allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity I get the following error: Warning: rename(tmp/,RosenData082112-1102.zip) : Permission denied in /Users/mmcri/Sites/rosenlab/download.php on line 42 I have checked the file after renaming manually and it seems to be fine. So not knowing what was wrong I thought I would just find the file by opening the directory and forcibly renaming it back to *.zip. ![]() ![]() But when I try to create a zip I get some unknown extension being appended at the end and 2 files are being created. I found the following: sudo chmod -R +a "_www allow read,write,append,readattr,writeattr,readextattr,writeextattr,readsecurity,file_inherit,directory_inherit" ~/Sites At first PHP couldn't even create a file. Go to Terminal and type zip -er (zipfiles name).zip (File path) Enter password: (your password) Verify password: (type it again) press enter. I am trying to let a user select files from a form have them zipped and sent to the individual. I am running mac os x 10.7, PHP, Apache and MySQL. After searching the internet find an answer I've decided to ask for help directly.
0 Comments
Leave a Reply. |