#0 [0]Error in News.php line 30

Class 'app\common\model\NewsModel' not found

  1. protected $size = 10;
  2. // 首页
  3. public function index()
  4. {
  5. $tid = input('param.tid', 0);
  6. $id = input('param.id');
  7. $template = 'index';
  8. $view = [];
  9. $amod = new NewsModel();
  10. $allcategory = cache($this->molds.'Category');
  11. $tree = new TreeService($allcategory);
  12. if ($id) {
  13. $lists = $amod->where('id', $id)->find();
  14. if (!$lists) {
  15. $this->error('信息不存在');
  16. }
  17. $amod->where('id', $id)->inc('hits')->update();

Call Stack

  1. in News.php line 30
  2. at News->index()
  3. at ReflectionMethod->invokeArgs() in Container.php line 344
  4. at Container->invokeReflectMethod() in Controller.php line 110
  5. at Controller->think\route\dispatch\{closure}() in Pipeline.php line 59
  6. at Pipeline->think\{closure}() in Browers.php line 57
  7. at Browers->handle()
  8. at call_user_func() in Middleware.php line 142
  9. at Middleware->think\{closure}() in Pipeline.php line 85
  10. at Pipeline->think\{closure}() in Pipeline.php line 66
  11. at Pipeline->then() in Controller.php line 113
  12. at Controller->exec() in Dispatch.php line 90
  13. at Dispatch->run() in Route.php line 772
  14. at Route->think\{closure}() in Pipeline.php line 59
  15. at Pipeline->think\{closure}() in Pipeline.php line 66
  16. at Pipeline->then() in Route.php line 773
  17. at Route->dispatch() in Http.php line 216
  18. at Http->dispatchToRoute() in Http.php line 206
  19. at Http->think\{closure}() in Pipeline.php line 59
  20. at Pipeline->think\{closure}() in MultiApp.php line 71
  21. at MultiApp->think\app\{closure}() in Pipeline.php line 59
  22. at Pipeline->think\{closure}() in Pipeline.php line 66
  23. at Pipeline->then() in MultiApp.php line 72
  24. at MultiApp->handle()
  25. at call_user_func() in Middleware.php line 142
  26. at Middleware->think\{closure}() in Pipeline.php line 85
  27. at Pipeline->think\{closure}() in SessionInit.php line 67
  28. at SessionInit->handle()
  29. at call_user_func() in Middleware.php line 142
  30. at Middleware->think\{closure}() in Pipeline.php line 85
  31. at Pipeline->think\{closure}() in TraceDebug.php line 71
  32. at TraceDebug->handle()
  33. at call_user_func() in Middleware.php line 142
  34. at Middleware->think\{closure}() in Pipeline.php line 85
  35. at Pipeline->think\{closure}() in Pipeline.php line 66
  36. at Pipeline->then() in Http.php line 207
  37. at Http->runWithRequest() in Http.php line 170
  38. at Http->run() in index.php line 20

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
SCRIPT_NAME /index.php
REQUEST_URI /news.html
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /news.html
REMOTE_PORT 57122
SCRIPT_FILENAME /www/wwwroot/www.cvcip.com/public/index.php
SERVER_ADMIN webmaster@example.com
CONTEXT_DOCUMENT_ROOT /www/wwwroot/www.cvcip.com/public
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /www/wwwroot/www.cvcip.com/public
REMOTE_ADDR 44.222.129.73
SERVER_PORT 80
SERVER_ADDR 172.26.128.113
SERVER_NAME cvcip.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE <address>Apache Server at cvcip.com Port 80</address>
LD_LIBRARY_PATH /www/server/apache/lib
PATH /www/server/panel/pyenv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
HTTP_HOST cvcip.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
proxy-nokeepalive 1
REDIRECT_STATUS 200
REDIRECT_PATH_INFO news.html
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711727038.4524
REQUEST_TIME 1711727038