Home > Backend Development > PHP Tutorial > php中出现“Call to a member function Execute() on a non-object”的有关问题

php中出现“Call to a member function Execute() on a non-object”的有关问题

WBOY
Release: 2016-06-13 13:08:32
Original
1198 people have browsed it

php中出现“Call to a member function Execute() on a non-object”的问题

?没得办法,学艺不精,今天使用php+adodb进行数据库操作的时候出现“Call to a member function Execute() on a non-object”错误。搞了半天,终于晓得了,在php自定义函数中使用了全局变量,但是没有使用global语句在函数的开头进行声明。php使用变量是不需声明的,因此在函数中使用我想用的那个全局变量的时候,实际上默认创建了一个同名的局部变量,这样,出现错误就是很正常的了。嘿嘿,global一下,下次,你也记住哦~

?

http://hi.baidu.com/is8888/blog/item/d5663811e8829519b9127bbf.html

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template