DB.class.phpPS:问题不是在哪里调用logout(),以及那部分是在对象范围内还是在对象范围外。第一部分是“$this ->_db->->id”,第二部分是“$ this ->$this()->id”,这两部分就在错误的行上,但我猜第二个原因是我使用了很多次"$this->_db->get“,只有在我使用这篇文章顶部的checkUserAgent()代码时才会遇到问题。
当我尝试在Symfony 5上编写服务类时,我遇到了一个问题。 $soldeAbondement = "NC"; return $soldeAbondement;}
当我想要使用我的函数getSoldeAbondement时,我遇到了这个错误:Using $this when not in object context.我不明白为什么我不在对象上下文中</
我正在创建一个显示博客的函数,所以我创建了一个show blog函数,但它一直显示"Using $this when not in object context“错误 $sqlString = "SELECT blog_id FROM jab_blog"; $sqlString .= " WHERE blog_cat = " . $cat