"CalltoamemberfunctionExecute () onanon-object" appears in php.

Source: Internet
Author: User
In php, the question "CalltoamemberfunctionExecute () onanon-object" appears? There is no way to do it. I am not very good at learning. today, when I use php + adodb for database operations, the "CalltoamemberfunctionExecute () onanon-object" error occurs. After a long time, I finally realized that the "Call to a member function Execute () on a non-object" issue appeared in the php user-defined function.

? There is no way to solve this problem. today, when using php + adodb for database operations, the "Call to a member function Execute () on a non-object" error occurs. After a long time, I finally realized that global variables were used in php user-defined functions, but they were not declared at the beginning of the function using global statements. Php does not need to declare variables. Therefore, when using the global variable I want to use in the function, a local variable with the same name is actually created by default, the error is normal. Hey, global. next time, remember ~

?

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.