Here is the code I am attempting to use:
Code: $dir="../includes2/";
$handle=fopen($dir.$file,'w');
$data="<?phpn";
fwrite($handle,$data);
$data="$hostName ='" . $loc . "'; ";
fclose($handle);
echo "Check and see if it worked."
?>The line in question is :
$data="$hostName ='" . $loc . "'; ";
So far, I have only been successful at getting the following end result:
Code: <?php
='localhost'; What escape characters do I need to use to "$" without php looking for a variable value?
Thanks for the help