脚本宝典收集整理的这篇文章主要介绍了php – 致命错误:在不在对象上下文中时使用$this,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
第6行是:$jpp = $this-> VARs-> data [“jpp”];
function DoEvents($this) { global $_CONF,$_PAGE,$_TSM,$base; $jpp = $this->vars->data["jpp"]; $cache["departments"] = $this->db->QFetchrowArray("SELECT * From {$this->tables[job_departments]}"); $cache["locations"] = $this->db->QFetchRowArray("SELECT * From {$this->tables[job_location]}"); $cache["names"] = $this->db->QFetchRowArray("SELECT * FROM {$this->tables[job_names]}"); $cache["categories"] = $this->db->QFetchRowArray("SELECT * FROM {$this->tables[job_categories]}");
非常感谢!欣赏!
还行吧
class Foo { function bar() { $this->...
这不是
function some() { $this->
//编辑:没注意到他将“$this”作为参数传递
建议:简单地用“$somethingElse”替换“$this”
以上是脚本宝典为你收集整理的php – 致命错误:在不在对象上下文中时使用$this全部内容,希望文章能够帮你解决php – 致命错误:在不在对象上下文中时使用$this所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。