Hello everyone, I don't know why this has been stumping me but maybe you pro's can help.
I am writing an script install program that writes the config file everything works fine except I cannot get it to write the double quotations I need.
Here is the entry form code:
<td width="150" align="right" class="contentfont">Host Name </td>
<td class="contentfont"><input name="$HOST" type="text" id="$HOST" value="localhost" size="40" /></td>
Here is the fopen code:
$fp = fopen('../includes/config.php', 'w');
if ($fp)
{
$content = "<?php \n".
" \n".
"/* Database Host Name */ \n".
"define(\"HOST\"," . $post_details['$HOST'] . "); \n".
" \n".
Here is the results in the newly created config file:
<?php
/* Database Host Name */
define("HOST",localhost);
needs to be
<?php
/ Database Host Name /
define("HOST","localhost");
I have tried everything I can think of and searched everything here but still no luck. If anyone has an idea for me I sure would appreciate it.