0
클래스에서 역할을하는 간단한 변수를 사용하고 싶습니다. 그러나 이것은 작동하지 않습니다.PHP 클래스의 GLOBAL 변수
$GLOBALS['world'] = "Isara";
class Character{
var $name;
var $status;
static $content;
function __construct($name){
$this->name=$name;
$this->getCharInfo();
}
private function getCharInfo(){
if(empty(self::$content)){
self::$content = file_get_contents("http://www.tibia.com/community/?subtopic=worlds&world=$GLOBALS['world']",0);