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.