我按照指示的步骤,建了数据库和表,但是打开网页是,报错,请帮助打一下原因。
Fatal error: Uncaught Error: Call to a member function query() on null in D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php:382 Stack trace: #0 D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php(740): baseDAO->count('') #1 D:\xampp_dev\htdocs\zdphp\module\blog\model.php(24): baseDAO->page(Object(pager)) #2 D:\xampp_dev\htdocs\zdphp\module\blog\control.php(38): blogModel->getList(Object(pager)) #3 D:\xampp_dev\htdocs\zdphp\framework\base\router.class.php(1690): blog->index(0, 20, 0) #4 D:\xampp_dev\htdocs\zdphp\index.php(31): baseRouter->loadModule() #5 {main} thrown in D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php on line 382
10:24:43 Uncaught Error: Call to a member function query() on null in lib\base\dao\dao.class.php:382
Stack trace:
#0 lib\base\dao\dao.class.php(740): baseDAO->count('')
#1 module\blog\model.php(24): baseDAO->page(Object(pager))
#2 module\blog\control.php(38): blogModel->getList(Object(pager))
#3 framework\base\router.class.php(1690): blog->index(0, 20, 0)
#4 index.php(31): baseRouter->loadModule()
#5 {main}
thrown in lib\base\dao\dao.class.php on line 382 when visiting blog
使用github上的源代码提示Call to undefined function isonlybody() in /srv/www/zentaophp/lib/base/front/front.class.php on line 117 when visiting ,请教该在哪里定义isonlybody()方法呢?
非常感谢王总的无私奉献精神,不知道王总是否方便开个QQ群方便讨论交流呢?
Fatal error: Uncaught Error: Call to a member function query() on null in D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php:382 Stack trace: #0 D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php(740): baseDAO->count('') #1 D:\xampp_dev\htdocs\zdphp\module\blog\model.php(24): baseDAO->page(Object(pager)) #2 D:\xampp_dev\htdocs\zdphp\module\blog\control.php(38): blogModel->getList(Object(pager)) #3 D:\xampp_dev\htdocs\zdphp\framework\base\router.class.php(1690): blog->index(0, 20, 0) #4 D:\xampp_dev\htdocs\zdphp\index.php(31): baseRouter->loadModule() #5 {main} thrown in D:\xampp_dev\htdocs\zdphp\lib\base\dao\dao.class.php on line 382
10:24:43 Uncaught Error: Call to a member function query() on null in lib\base\dao\dao.class.php:382
Stack trace:
#0 lib\base\dao\dao.class.php(740): baseDAO->count('')
#1 module\blog\model.php(24): baseDAO->page(Object(pager))
#2 module\blog\control.php(38): blogModel->getList(Object(pager))
#3 framework\base\router.class.php(1690): blog->index(0, 20, 0)
#4 index.php(31): baseRouter->loadModule()
#5 {main}
thrown in lib\base\dao\dao.class.php on line 382 when visiting blog
完整的内容应该是:
<?php
$config->installed = true;
$config->debug = true;
$config->requestType = 'PATH_INFO';
$config->requestFix = '-';
$config->webRoot = '/zdphp/';
$config->db->host = 'localhost';
$config->db->port = '3306';
$config->db->name = 'blog';
$config->db->user = 'root';
$config->db->password = '';
function createLink()里面有这么一段
$link .= '.' . $viewType;
其中$viewType 的值是 html
但是后台拼接起来的是hello-world.html 是我搞错了,还是怎么回事···
或者直接调用方法 $this->loadModel($moduleName)->$methodName();
PATHINFO需要URL重写支持。
你在质疑别人工作之前,有没有考虑过自己有真搞明白问题是什么了吗?
出现错误:
The requested URL /zentaophp/blog-create.html was not found on this server.
Apache/2.4.9 (Win32) PHP/5.5.12 Server at localhost Port 9876
http://localhost:9876/zentaophp/index.php/blog-create.html这样就是正确的,怎样就可以把这个index.php去掉?
非常感谢王总的无私奉献精神,不知道王总是否方便开个QQ群方便讨论交流呢?
http://localhost/zentaophp/blog-create,
变成了http://localhost/zentaophp/blog-create.html
不能使用了
怎么回事呢?为什么这些超链接都加了html?
但是点击链接仅仅在浏览器的location有变化,必须再刷新才能够到新的页面去。