[0] HttpException in News.php line 48

内容不存在!

  1. $articleObj = new ArticleList();
  2. $articleObj->where('id', $id)->where('is_draft', 0)->setInc('Click', 1);
  3. //详情
  4. if ($id > 12170) {//原来的文章不限制,新文章需要限制
  5. $news = $articleObj->where('TypeId','<>',73)->where('is_draft', 0)->find(['id' => $id]);
  6. } else {
  7. $news = $articleObj->where('is_draft', 0)->find(['id' => $id]);
  8. }
  9. if (is_null($news)) {
  10. throw new \think\exception\HttpException(404, '内容不存在!');
  11. // return $this->error('内容不存在!');
  12. }
  13. $news = $news->toArray();
  14. //查询所属菜单
  15. $articleType = ArticleType::get(['id' => $news['TypeId']]);
  16. $this->view->assign('news', $news);
  17. $this->view->assign('articleType', $articleType);
  18. $this->setSeo($news['SeoTitle'], $news['SeoKeywords'], $news['SeoDescription']);

Call Stack

  1. in News.php line 48
  2. at News->index()
  3. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  4. at App::invokeMethod([object(News), 'index'], []) in App.php line 611
  5. at App::module([null, 'news', 'index'], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...], false) in App.php line 457
  6. at App::exec(['type' => 'module', 'module' => [null, 'news', 'index'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => true, ...]) in App.php line 139
  7. at App::run() in start.php line 19
  8. at require('/www/wwwroot/www.bon...') in index.php line 18

Environment Variables

GET Data
empty
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
FCGI_ROLE
RESPONDER
REDIRECT_SCRIPT_URL
/news/618.html
REDIRECT_SCRIPT_URI
https://www.bonjun.cn/news/618.html
REDIRECT_PATH_INFO
news/618.html
REDIRECT_HTTPS
on
REDIRECT_SSL_TLS_SNI
www.bonjun.cn
REDIRECT_HTTP2
on
REDIRECT_H2PUSH
off
REDIRECT_H2_PUSH
off
REDIRECT_H2_PUSHED
REDIRECT_H2_PUSHED_ON
REDIRECT_H2_STREAM_ID
3
REDIRECT_H2_STREAM_TAG
2-3
REDIRECT_STATUS
200
SCRIPT_URL
/news/618.html
SCRIPT_URI
https://www.bonjun.cn/news/618.html
HTTPS
on
SSL_TLS_SNI
www.bonjun.cn
HTTP2
on
H2PUSH
off
H2_PUSH
off
H2_PUSHED
H2_PUSHED_ON
H2_STREAM_ID
3
H2_STREAM_TAG
2-3
proxy-nokeepalive
1
HTTP_ACCEPT
*/*
HTTP_USER_AGENT
claudebot
HTTP_HOST
www.bonjun.cn
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
LD_LIBRARY_PATH
/www/server/apache/lib
SERVER_SIGNATURE
<address>Apache Server at www.bonjun.cn Port 443</address>
SERVER_SOFTWARE
Apache
SERVER_NAME
www.bonjun.cn
SERVER_ADDR
172.18.160.99
SERVER_PORT
443
REMOTE_ADDR
3.239.83.89
DOCUMENT_ROOT
/www/wwwroot/www.bonjun.cn/public
REQUEST_SCHEME
https
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/www.bonjun.cn/public
SERVER_ADMIN
webmaster@example.com
SCRIPT_FILENAME
/www/wwwroot/www.bonjun.cn/public/index.php
REMOTE_PORT
57188
REDIRECT_URL
/news/618.html
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/2.0
REQUEST_METHOD
GET
QUERY_STRING
REQUEST_URI
/news/618.html
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711693844.4383
REQUEST_TIME
1711693844
PATH_INFO
news/618.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.bonjun.cn/public/../application/
THINK_VERSION
5.0.24
THINK_START_TIME
1711693844.4387
THINK_START_MEM
273280
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.bonjun.cn/thinkphp/
LIB_PATH
/www/wwwroot/www.bonjun.cn/thinkphp/library/
CORE_PATH
/www/wwwroot/www.bonjun.cn/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.bonjun.cn/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.bonjun.cn/
EXTEND_PATH
/www/wwwroot/www.bonjun.cn/extend/
VENDOR_PATH
/www/wwwroot/www.bonjun.cn/vendor/
RUNTIME_PATH
/www/wwwroot/www.bonjun.cn/runtime/
LOG_PATH
/www/wwwroot/www.bonjun.cn/runtime/log/
CACHE_PATH
/www/wwwroot/www.bonjun.cn/runtime/cache/
TEMP_PATH
/www/wwwroot/www.bonjun.cn/runtime/temp/
CONF_PATH
/www/wwwroot/www.bonjun.cn/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
0.086839s