Page 1 of 1
[HELP] How to create the file install.php
Posted: Sun Feb 08, 2009 9:29 am
by spaxy
Help me create a file install.php
I do not know how
Just started studying php
This code file /inc/conf.php
Code: Select all
<?php
define("DIRECTORY", "");
$statistical_database = "";
$statistical_database_host = "";
$statistical_database_login = "";
$statistical_database_password = "";
define("statistical_database_host", "");
define("statistical_database", "");
define("statistical_database_login", "");
define("statistical_database_password", "");
$database = "";
$database_host = "";
$database_login = "";
$database_password = "";
define("database_host", "");
define("database", "");
define("database_login", "");
define("database_password", "");
?>
Re: [HELP] How to create the file install.php
Posted: Sun Feb 08, 2009 10:35 am
by Weirdan
Code: Select all
// conf.php
<?php
define("DIRECTORY", "@directory@");
$statistical_database = "@statistical_database@";
$statistical_database_host = "@statistical_database_host@";
$statistical_database_login = "@statistical_database_login@";
$statistical_database_password = "@statistical_database_password@";
Code: Select all
// install.php
$conf = array(
'@directory@' => '/var/www/host/name',
'@statistical_database@' => 'stat_database',
'@statistical_database_host@' => 'localhost',
'@statistical_database_login@' => 'root',
'@statistical_database_password@' => 'pass',
);
file_put_contents('conf.php', str_replace(array_keys($conf), array_values($conf), file_get_contents('conf.php')));
Re: [HELP] How to create the file install.php
Posted: Sun Feb 08, 2009 10:59 am
by spaxy