workman中处理数据库问题

浏览:144 发布日期:2021/09/18 分类:ThinkPHP5专区
问一下:为什么我在workman中on方法中任何数据库操作,如db()方法都是报错啊?这个东西是不能正常用tp的数据库操作方法吗?

think\exception\ErrorException: mkdir(): Permission denied in D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\log\driver\File.php:52
Stack trace:
#0 [internal function]: think\Error::appError(2, 'mkdir(): Permis...', 'D:\\xampp\\htdocs...', 52, Array)
#1 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\log\driver\File.php(52): mkdir('../runtime/log\\...', 493, true)
#2 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\Log.php(179): think\log\driver\File->save(Array, true)
#3 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\Log.php(109): think\Log::save()
#4 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\Db.php(95): think\Log::record('[ DB ] INIT mys...', 'info')
#5 D:\xampp\htdocs\ZJGAPP\thinkphp\helper.php(197): think\Db::connect(Array, '40cd750bba9870f...')
#6 D:\xampp\htdocs\ZJGAPP\application\test\controller\Server.php(18): db('test_pk')
#7 D:\xampp\htdocs\ZJGAPP\vendor\workerman\workerman\Worker.php(2415): app\test\controller\Server->app\test\controller\{closure}(object(Workerman\Worker))
#8 D:\xampp\htdocs\ZJGAPP\vendor\workerman\workerman\Worker.php(1418): Workerman\Worker->run()
#9 D:\xampp\htdocs\ZJGAPP\vendor\workerman\workerman\Worker.php(1361): Workerman\Worker::forkWorkersForWindows()
#10 D:\xampp\htdocs\ZJGAPP\vendor\workerman\workerman\Worker.php(542): Workerman\Worker::forkWorkers()
#11 D:\xampp\htdocs\ZJGAPP\application\test\controller\Server.php(95): Workerman\Worker::runAll()
#12 [internal function]: app\test\controller\Server->index()
#13 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\App.php(343): ReflectionMethod->invokeArgs(object(app\test\controller\Server), Array)
#14 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\App.php(611): think\App::invokeMethod(Array, Array)
#15 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\App.php(456): think\App::module(Array, Array, false)
#16 D:\xampp\htdocs\ZJGAPP\thinkphp\library\think\App.php(139): think\App::exec(Array, Array)
#17 D:\xampp\htdocs\ZJGAPP\thinkphp\start.php(19): think\App::run()
#18 D:\xampp\htdocs\ZJGAPP\public\index.php(14): require('D:\\xampp\\htdocs...')
#19 {main}
最佳答案
评论( 相关
后面还有条评论,点击查看>>