PHP expert |
|
Ik gebruik dit om mijn config.php file aan te maken:
<?php
$config = <<<HTML
<?php
include './mysql.class.php';
$db = new DataBase;
\$host = "$_POST['DatabaseHost']";
\$user = "$_POST['DatabaseUser']";
\$pass = "$_POST['DatabasePassword']";
\$database = "$_POST['DatabaseName']";
$db->Connect ($host, $user, $pass, $database);
?>
HTML;
$confile = fopen('includes/config.php', 'w');
fwrite($confile, $config);
fclose($confile);
<?php $config = <<<HTML <?php include './mysql.class.php'; $db = new DataBase; \$host = "$_POST['DatabaseHost']"; \$user = "$_POST['DatabaseUser']"; \$pass = "$_POST['DatabasePassword']"; \$database = "$_POST['DatabaseName']"; $db->Connect ($host, $user, $pass, $database); ?> HTML; $confile = fopen('includes/config.php', 'w'); fwrite($confile, $config); fclose($confile);
maar hij nekt op regel 218:
Citaat: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in D:programsxampphtdocsUltimate-Content-Managerinstall.php on line 218
ps. dit is regel 212 t/m 228
|