I’m tyring to have an install file create a config file using the string bellow but I keep getting this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in…
$tempcon = '
<?php
// Give Usage string for Config File
if(isset($_GET["gimi"])) {
die('"' . str_replace('\\','\\\\',__FILE__) . '"'); // <--- The error is on this line!
}
$dbhost = "'. $_POST["dbhost"] .'"; // Database Host Address
$dbname = "'. $_POST["dbname"] .'"; // Database Name
$dbuser = "'. $_POST["dbuser"] .'"; // Database Username
$dbpass = "'. $_POST["dbpass"] .'"; // Database Password
?>';
What am I doing wrong?
Thanks in advance,
Robert
You need to escape the
'in the string.