With method_exists, the system always prompts that the method does not exist. how can I debug this error?

Source: Internet
Author: User
With method_exists, the system always prompts that the method does not exist. how can I debug this error? $ Jms = new $ control ($ conf ['DB'] ['dsn '], $ conf ['DB'] ['user'], $ conf ['DB'] ['password']);
$ Jms-> debugLevel = $ conf ['debug'] ['level'];
If (! Method_exists ($ jms, $ action) notfound ('method does not exist ');


Reply to discussion (solution)

Are there anyone else?

Print_r (get_class_methods ($ jms ));
Check whether the value of $ action is in it.

Php says it does not exist, that is, it does not exist.

Check whether the method you call is not introduced into the project, which makes it clear that this method cannot be called.

Thank you!

The problem was resolved by myself last night. This is because the project uses the PDO component. I am a newbie, and then open the PDO component support in the php. ini file.

$ Jms = new $ control ($ conf ['DB'] ['dsn '], $ conf ['DB'] ['user'], $ conf ['DB'] ['password']);
Is it because you instantiate the class method? the error is reported in it. it is not executed later.

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.