0
これはコードです:お知らせ:未定義のインデックス:クラス - に>配列
class app {
public $conf = array();
public function init(){
global $conf;
$conf['theme'] = 'default';
$conf['favicon'] = 'favicon.ico';
}
public function site_title(){
return 'title';
}
}
$app = new app;
$app->init();
//output
echo $app->conf['theme'];
そして、私はこのエラーを取得:私が間違っている
Notice: Undefined index: theme in C:\xampp\htdocs\...\trunk\test.php on line 21
を、そして任意の簡単な方法があります同じ結果を得るには?