PHP对象调用函数失败解决思路

WBOY
Release: 2016-06-13 12:26:25
Original
1293 people have browsed it

PHP对象调用函数失败
不知道为什么,控制器中代码已写好,但是通过index调用的时候出现了错误
dbController.class.php文件代码:

class dbController{
function connect(){
$db = new dbModel();
$db->get();
}
}
?>

index.php文件代码:

                        require_once("./config.php");
                        require_once("./libs/controls/dbController.class.php");
                        require_once("./libs/models/dbModel.class.php");
                        require_once("./libs/views/dbView.class.php");
                        $db = new dbController();
                        $db -> conncet();
                    ?>

效果图:

------解决思路----------------------
定义 function connect(){
调用 $db -> conncet();

太粗心了

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!