So here is an example of what needs to be in the config file:
Code: Select all
#Edit this area to set your admin username and password
$adminuser = "admin"; #administrator username
$adminpass = "admin"; #administrator password
$adminknown = "Steve"; #Who the administrator is known as (aka name)
//End of Admin edit area
# Edit this area to set the title of your blog, your email, etc
$title = "Simpleblog"; #The title of your blog appears in Title Bar for web browser
$blogname = "steve's blog"; #Name of blog as you want to appear in the page header
$email = "admin@open-server.org"; #Your email address
$name = "steve"; #Your name or nick name
$perpage = "50000"; #Number of entrys for the homepage
$absolute = "http://www.open-server.org/"; #absolute location of blog
//End general information areaCode: Select all
<?php
$filename = 'config2.php';
$somecontent = "$dbuser = \"root\"; $dbserver = \"localhost\";";
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'a')) {
echo "Cannot open file ($filename)";
exit;
}
if (fwrite($handle, $somecontent) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote ($somecontent) to file ($filename)";
fclose($handle);
} else {
echo "The file $filename is not writable";
}
?>For example: Currently it says $dbuser = root but when it writes to the file it only writes = root
Thanks in advance.