NumBa1Stunna516
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?
Nightfire
09-09-2005, 09:08 PM
http://www.phpconcept.net/pclzip/index.en.php
NumBa1Stunna516
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:
<?php
$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
<?php
= "test";
?>
How can I get what I want? Thanks.
Nightfire
09-10-2005, 12:10 AM
Try using single quotes
$fileinfoadd = '<?php\n$why="test";\n?>";