我正在尝试对网站进行有组织的设置,但我遇到了一个问题,在 Class 文件上,$website['website_name'] = 'Delusion Servers';
当我将变量放在函数中时,我已经使用过,它说它未初始化。
<?php
/*
* Delusion Servers
* Website access at (delusionservers.com).
* Developed, designed and managed by Lewes B.
* PAGE: WEBSITE.CLASS.PHP
*/
$website['website_name'] = 'Delusion Servers';
class website {
function killPage($content){
die("
<h1>" . $website['website_name'] ."encountered an error</h1>
<br /><br />" . $content . "
");
}
}
$website = new Website;
?>
怎么了?