Hello,
I'm trying to create a PHP script that will take user-submitted data from a database and place it into a nice HTML file. I've gotten this done, but my problem is figuring out how to zip the HTML file (with a few images) into a *.zip archive.
How can I do this?
I've tried running zip commands through exec();, shell_exec(); and through backtick operators, but I still haven't had any sucess. I don't know if my command is invalid either because I never receive any errors. Here are some of the zip commands I've tried:
<i>"zip yeah -j /home/leapingfrog/www/arc7/index.php"
"zip -j /home/leapingfrog/www/arcadmin/ttrctr/admin/zipfile /home/leapingfrog/www/arcadmin/ttrctr/admin/zipped_index.html"
"zip /home/leapingfrog/www/arcadmin/ttrctr/admin/zipfile /home/leapingfrog/www/arcadmin/ttrctr/admin/zipped_index.html"
"zip zipfile zipped_index.html"</i>
I haven't had any sucess with any of these. After the command is run, I can't find a single zip file on my server.
What am I doing wrong?
Thanks,
Andrew