use *\*\file\json_datas as file;
然后在一种方法中,我通过实例化文件类来加载文件而没有问题
private function load_json(){ $this->settings["json"] = new file($this->settings["file"],false,false); $this->content["json"] = new file($this->content["file"],false,false);
至此,$ this-> content [“ json”]的输出返回我期望的结果,或者
*\*\file\json_datas Object ( [file] => en.json [name] => en [extension] => json [folder] => #### [fullpath] => /#####/ [datas] => stdClass Object ( [head] => stdClass Object ( [title] => Array
但是当我想如下直接引用头部时,就会出现我的问题
$this->head =& $this->content["json"]->datas->head;
都不
$this->head =& $this->content["json"]["datas"]["head"];
$ this-> head的输出为空,并且(在E_ALL处有error_reporting)我没有收到错误/通知记录。有什么主意吗?