[2] ErrorException in Bot.php line 20

file_get_contents(http://www.jsjmy123.com/addons/cms/index/index): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error

  1. $rs = Request::instance();
  2. $url = $rs->domain();
  3. if (file_exists($cacheDir . '/' . $cacheFileName) && (time() - filemtime($cacheDir . '/' . $cacheFileName)) < 600) {
  4. // 缓存文件存在且未超过10分钟,直接读取缓存文件内容
  5. $cachedData = file_get_contents($cacheDir . '/' . $cacheFileName);
  6. return $cachedData;
  7. } else {
  8. $index_content = $url . '/addons/cms/index/index';
  9. $index_content = file_get_contents($index_content);
  10. // 缓存文件不存在或超过10分钟,重新生成缓存并存储
  11. $dataToCache = $index_content;
  12. // 存储数据到缓存文件
  13. file_put_contents($cacheDir . '/' . $cacheFileName, $dataToCache);
  14. return $dataToCache;
  15. }
  16. }

Call Stack

  1. in Bot.php line 20
  2. at Error::appError(2, 'file_get_contents(ht...', '/disk/wwwroot/www.js...', 20, ['isWWWDomain' => true, 'cacheFileName' => 'www_cache.txt', 'cacheDir' => '/disk/wwwroot/www.js...', ...])
  3. at file_get_contents('http://www.jsjmy123....') in Bot.php line 20
  4. at Bot::get_cms_index() in Index.php line 186
  5. at Index->index()
  6. at call_user_func_array([object(Index), 'index'], []) in Route.php line 78
  7. at Route->execute('nightcat', 'index', 'index')
  8. at ReflectionMethod->invokeArgs(object(Route), ['nightcat', 'index', 'index']) in App.php line 343
  9. at App::invokeMethod(['\think\addons\Route', 'execute'], ['_m' => 'mod_product', '_a' => 'prdlist', 'cap_id' => '98', ...]) in App.php line 470
  10. at App::exec(['type' => 'method', 'method' => ['\think\addons\Route', 'execute'], 'var' => ['addon' => 'nightcat', 'controller' => 'index', 'action' => 'index']], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/disk/wwwroot/www.js...') in index.php line 24

Environment Variables

GET Data

_m
mod_product
_a
prdlist
cap_id
98
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
HTTP_REFERER
http://jsjmy123.com/index.php?_m=mod_product&_a=prdlist&cap_id=98
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_ALI_CDN_REAL_IP
3.227.239.160
HTTP_X_CLIENT_SCHEME
http
HTTP_X_FORWARDED_FOR
3.227.239.160
HTTP_ALI_SWIFT_STAT_HOST
level2.all.jsjmy123.com
HTTP_ALI_SWIFT_LOG_HOST
www.jsjmy123.com
HTTP_EAGLEEYE_TRACEID
65e21ca217116600745068203e
HTTP_VIA
cn4757.l1, vcache24.cn4757, l2cn2656.l2, cache9.l2cn2656
HTTP_HOST
www.jsjmy123.com
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
www.jsjmy123.com
SERVER_PORT
80
SERVER_ADDR
154.7.7.193
REMOTE_PORT
41608
REMOTE_ADDR
36.156.89.139
SERVER_SOFTWARE
nginx/1.22.1
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/disk/wwwroot/www.jsjmy123.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/index.php?_m=mod_product&_a=prdlist&cap_id=98
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
_m=mod_product&_a=prdlist&cap_id=98
SCRIPT_FILENAME
/disk/wwwroot/www.jsjmy123.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711660074.9639
REQUEST_TIME
1711660074
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/disk/wwwroot/www.jsjmy123.com/public/../application/
THINK_VERSION
5.0.25
THINK_START_TIME
1711660074.9649
THINK_START_MEM
427328
EXT
.php
DS
/
THINK_PATH
/disk/wwwroot/www.jsjmy123.com/thinkphp/
LIB_PATH
/disk/wwwroot/www.jsjmy123.com/thinkphp/library/
CORE_PATH
/disk/wwwroot/www.jsjmy123.com/thinkphp/library/think/
TRAIT_PATH
/disk/wwwroot/www.jsjmy123.com/thinkphp/library/traits/
ROOT_PATH
/disk/wwwroot/www.jsjmy123.com/
EXTEND_PATH
/disk/wwwroot/www.jsjmy123.com/extend/
VENDOR_PATH
/disk/wwwroot/www.jsjmy123.com/vendor/
RUNTIME_PATH
/disk/wwwroot/www.jsjmy123.com/runtime/
LOG_PATH
/disk/wwwroot/www.jsjmy123.com/runtime/log/
CACHE_PATH
/disk/wwwroot/www.jsjmy123.com/runtime/cache/
TEMP_PATH
/disk/wwwroot/www.jsjmy123.com/runtime/temp/
CONF_PATH
/disk/wwwroot/www.jsjmy123.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
ADDON_PATH
/disk/wwwroot/www.jsjmy123.com/addons/