/*数据库配置*/
'DB_TYPE' => 'mysql', // 数据库类型
'DB_HOST' => '127.0.0.1', // 服务器地址
'DB_NAME' => 'ceshi', // 数据库名
'DB_USER' => 'root', // 用户名
'DB_PWD' => '', // 密码
'DB_PORT' => '3306', // 端口
'DB_PREFIX' => 'nnj_', // 数据库表前缀 $add = M("order");
$res = where('id=1')->select();为什么啊?错误位置
FILE: D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\Db.class.php LINE: 42
TRACE
#0 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\Db.class.php(42): E('\xE6\x97\xA0\xE6\xB3\x95\xE5\x8A\xA0\xE8\xBD\xBD\xE6\x95\xB0...')
#1 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\Model.class.php(1420): Think\Db::getInstance('')
#2 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\Model.class.php(95): Think\Model->db(0, '', true)
#3 D:\Wamp\www\thinkphp\ThinkPHP\Common\functions.php(564): Think\Model->__construct('order', '', '')
#4 D:\Wamp\www\thinkphp\Index\Home\Controller\BuyController.class.php(36): M('order')
#5 [internal function]: Home\Controller\BuyController->pay()
#6 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\App.class.php(156): ReflectionMethod->invoke(Object(Home\Controller\BuyController))
#7 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\App.class.php(194): Think\App::exec()
#8 D:\Wamp\www\thinkphp\ThinkPHP\Library\Think\Think.class.php(120): Think\App::run()
#9 D:\Wamp\www\thinkphp\ThinkPHP\ThinkPHP.php(97): Think\Think::start()
#10 D:\Wamp\www\thinkphp\index.php(10): require('D:\\Wamp\\www\\thi...')
#11 {main} 最佳答案