致命错误:未被捕获的错误:在不在对象上下文中时使用$ this [英] Fatal error: uncaught error: using $this when not in object context in
本文介绍了致命错误:未被捕获的错误:在不在对象上下文中时使用$ this的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<a href="https://postimg.org/gallery/39s2qs54c/">Album — Postimage.org</a>[<a href="https://postimg.org/gallery/39s2qs54c/" target="_blank" title="New Window">^</a>]
i change: $this->db = new DB_con();
out with $my_db_connection = new DB_Con;
and $result = $this->db->query($query);
out with $result = $my_db_connection->connection->query($query);?
the first one is in class.user file with a link to database the second line is in login with a link to class.user file
or something else how i fix this?
我尝试了什么:
i am comfused我不知道如何修复请帮助
What I have tried:
i am comfused i dont no how to fix please help
推荐答案
this-> db = new DB_con();
out with
this->db = new DB_con(); out with
my_db_connection = new DB_Con;
和
my_db_connection = new DB_Con; and
result =
这篇关于致命错误:未被捕获的错误:在不在对象上下文中时使用$ this的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文