Call to undefined method PDO::execute()

在调试php的时候弹出报错

Call to undefined method Database::prepare()

Call to undefined method PdoMySQL::prepare()

解决方法:

参考链接:

https://stackoverflow.com/questions/3716798/call-to-undefined-method-databaseprepare

https://stackoverflow.com/questions/23371118/call-to-undefined-method-pdoexecute#

There is no method prepare in your Database class. That belongs to the PDO object that you are storing as $link.

What you are probably looking for is

Database :: $link->prepare(…)

部分代码段: