Thinkphp中在本地测试很好,在服务器上出错,有可能是因为debug缓存的问题 define('APP_DEBUG',false); 这个设置从true改为false后,一定要清空缓存,否则会出错。