当前位置: 动力学知识库 > 问答 > 编程问答 >

class - PHP referencing variable causes page to not load

问题描述:

I have the following class and sometimes (but not always) when I call the run function I get a "The localhost page isn’t working" message on the browser.

class className {

private $string;

public function run() {

if ( isset($this->string) )

echo 'yay';

}

}

分享给朋友:
您可能感兴趣的文章:
随机阅读: