
dinho1998
(usa Outra)
Enviado em 05/02/2020 - 19:38h
## install related functions
function create_config($post_details)
{
$fp = fopen('../includes/config.php', 'w');
if ($fp)
{
$content = "<?php \n".
" \n". ----------------------------------------nessa linha esta o erro e não aparece pra instalar
"/* Database Host Name */ \n".
"\$db_host = '" . $post_details['db_host'] . "'; \n".
" \n".
"/* Database Username */ \n".
"\$db_username = '" . $post_details['db_username'] . "'; \n".
" \n".
"/* Database Login Password */ \n".
"\$db_password = '" . $post_details['db_password'] . "'; \n".
" \n".
"/* Database and Session prefixes */ \n".
"define('DB_PREFIX', '" . $post_details['table_prefix'] . "'); ## Do not edit ! \n".
"define('SESSION_PREFIX', 'probid_'); \n".
" \n".
"/* Database Name */ \n".
"\$db_name = '" . $post_details['db_name'] . "'; \n".
"?>";
fputs($fp, $content);
fclose($fp);
$output['display'] = '<b>The configuration file was created successfully.</b>';
$output['result'] = true;
}
else
{
$output['display'] = '<b>Error: Could not create the configuration file.</b><br> '.
'Please make sure the <b>includes</b> folder has writing permissions and the <b>config.php</b>
return $output;
}