PHP trying to use autoload function to find PDO class

China☆狼群 提交于 2019-12-05 08:16:32

Its not really an autoload issue. You are attempting to call a class on the root namespace.

By the looks of it your are in some 'Model' namespace and calling PDO, you must remember that namespaces are relative by default.

What you want is to either call the the absolute path:

\PDO

or at the top of your file say you're going to use PDO like this:

use PDO;
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!