私はこのindex.phpファイルを持っています
# Loading configurations.
loadConfiguration('database');
loadConfiguration('site');
# Initializing the database connection.
$db = new database($c['db']['host'], $c['db']['username'], $c['db']['password'], $c['db']['name']);
unset($c['db']['password']);
また、loadConfiguration() は次のように設定されます。
function loadConfiguration($string) { require(path.'config/'.$string.'.con.php'); }
database.con.php と site.con.php が config/ フォルダーにあることを確認しました。そして、私が得る唯一のエラーはNotice: Undefined variable: c in the following lineです
$db = new database($c['db']['host'], $c['db']['username'], $c['db']['password'], $c['db']['name']);
ここにdatabase.con.phpがあります
# Ignore.
if (!defined('APP_ON')) { die('Feel the rain...'); }
$c['db']['host'] = 'localhost';
$c['db']['username'] = 'root';
$c['db']['password'] = '';
$c['db']['name'] = 'name';
これがsite.con.phpです
# Ignore.
if (!defined('APP_ON')) { die('Feel the rain...'); }
/* Site informations */
$c['site']['name'] = 'Namek';
$c['site']['mail'] = 'mail@whocares.com';
$c['site']['enable-email'] = false;
$c['site']['debug-mode'] = true;
私は何を間違っていますか?