View Full Version : Make PHP file and zip for download
09-09-2005, 08:54 PM
Hey I wanted to know how I can make a script where when a user hits submit a PHP file is made with information in it, then made into a zip and given for the user to download. Anyone know where I can find info on this or know a script that does this?
09-09-2005, 09:08 PM
09-09-2005, 10:17 PM
Okay that script is good, I have most of it working. Right now what I need to know is, I am using fwrite(); how can I have a php variable inputed into the file?
I want to add this code into the file:
$why = "test";
This is the code I have
$fileinfoadd = "<?php\n$why= \"test\";\n?>";
//$fileinfoadd is what gets into DB.
What I get in the file when that code is executed is this
How can I get what I want? Thanks.
09-10-2005, 12:10 AM
Try using single quotes
$fileinfoadd = '<?php\n$why="test";\n?>";
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.