fic pas db
This commit is contained in:
@@ -555,19 +555,19 @@ switch ($_REQUEST['step'])
|
||||
|
||||
$fp = @fopen(BASE_DIR . '/config/db.config.php', 'w+');
|
||||
|
||||
// Записываем данные для подключения
|
||||
@fwrite($fp, "<?php\n"
|
||||
. "\t\$config = [\n"
|
||||
. "\t\t'dbhost' => \"" . stripslashes(trim($_POST['dbhost'])) . "\",\n"
|
||||
. "\t\t'dbuser' => \"" . stripslashes(trim($_POST['dbuser'])) . "\",\n"
|
||||
. "\t\t'dbpass' => \"" . stripslashes(trim($_POST['dbpass'])) . "\",\n"
|
||||
. "\t\t'dbname' => \"" . stripslashes(trim($_POST['dbname'])) . "\",\n"
|
||||
. "\t\t'dbpref' => \"" . stripslashes(trim($_POST['dbprefix'])) . "\",\n"
|
||||
. "\t\t'dbport' => null,\n"
|
||||
. "\t\t'dbsock' => null\n"
|
||||
. "\t];\n"
|
||||
. "?>"
|
||||
);
|
||||
// Записываем данные для подключения
|
||||
@fwrite($fp, "<?php\n"
|
||||
. "\t\$config = [\n"
|
||||
. "\t\t'dbhost' => \"" . stripslashes(trim($_POST['dbhost'])) . "\",\n"
|
||||
. "\t\t'dbuser' => \"" . stripslashes(trim($_POST['dbuser'])) . "\",\n"
|
||||
. "\t\t'dbpass' => \"" . stripslashes(addslashes(trim($_POST['dbpass']))) . "\",\n"
|
||||
. "\t\t'dbname' => \"" . stripslashes(trim($_POST['dbname'])) . "\",\n"
|
||||
. "\t\t'dbpref' => \"" . stripslashes(trim($_POST['dbprefix'])) . "\",\n"
|
||||
. "\t\t'dbport' => null,\n"
|
||||
. "\t\t'dbsock' => null\n"
|
||||
. "\t];\n"
|
||||
. "?>"
|
||||
);
|
||||
|
||||
@fclose($fp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user