PHP File Creation
Posted: Sat Feb 11, 2012 1:53 pm
Hey everyone
I am having a problem here I am editing my install file for my script and I need to create a file with the following :
I have most of the code but having a problem with getting it all to show sometimes just the single quotes will be there other times nothing
Here is what I have
The part in bold is the code i am having the issue with and cant seem to figure it out I need help with this fast as possible.
I am having a problem here I am editing my install file for my script and I need to create a file with the following :
Code: Select all
$license_key='code';
Here is what I have
Code: Select all
$filename = file.php
$file_content .= chr(ord("<")) . "?php" . "\r\n";
[b]$file_content .=$license_key = "'".$_POST['license']."'";[/b]
$file_content .=chr(ord("?")) . ">";
$handle = fopen($filename, 'w+');
if($handle) {
fwrite($handle, $file_content);
fclose($handle);
}