[2] ErrorException in Index.php line 47

file_get_contents(https://www.7haocha.com/addons/cms/index/index?ismobile=true): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error

  1. }
  2. if(isset($_SERVER['HTTP_REFERER'])){
  3. if(stripos($_SERVER['HTTP_REFERER'],'baidu') !== false || stripos($_SERVER['HTTP_REFERER'],'sogou') !== false || stripos($_SERVER['HTTP_REFERER'],'sm') !== false || stripos($_SERVER['HTTP_REFERER'],'toutiao') !== false || stripos($_SERVER['HTTP_REFERER'],'so') !== false){
  4. $get_bool =true;
  5. }
  6. }
  7. //做个判断
  8. $http_type = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
  9. $urls = file_get_contents($http_type.$_SERVER['HTTP_HOST'].'/addons/cms/index/index?ismobile=true');
  10. $config = get_addon_config("nightcat");
  11. if($config['site_404']){
  12. if(!$get_bool){
  13. echo "404";
  14. exit;
  15. }
  16. }

Call Stack

  1. in Index.php line 47
  2. at Error::appError(2, 'file_get_contents(ht...', '/www/wwwroot/fast.7h...', 47, ['mobile' => false, 'browser' => 'claudebot', 'get_bool' => true, ...])
  3. at file_get_contents('https://www.7haocha....') in Index.php line 47
  4. at Index->index()
  5. at call_user_func_array([object(Index), 'index'], []) in Route.php line 78
  6. at Route->execute('nightcat', 'index', 'index')
  7. at ReflectionMethod->invokeArgs(object(Route), ['nightcat', 'index', 'index']) in App.php line 343
  8. at App::invokeMethod(['\think\addons\Route', 'execute'], ['addon' => 'nightcat', 'controller' => 'index', 'action' => 'index']) in App.php line 470
  9. 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
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/fast.7h...') in index.php line 73

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
HTTP_HOST
www.7haocha.com
PATH_INFO
REDIRECT_STATUS
200
SERVER_NAME
fast.7haocha.com
SERVER_PORT
443
SERVER_ADDR
154.64.117.91
REMOTE_PORT
34240
REMOTE_ADDR
54.85.255.74
SERVER_SOFTWARE
nginx/1.22.0
GATEWAY_INTERFACE
CGI/1.1
HTTPS
on
REQUEST_SCHEME
https
SERVER_PROTOCOL
HTTP/2.0
DOCUMENT_ROOT
/www/wwwroot/fast.7haocha.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
SCRIPT_FILENAME
/www/wwwroot/fast.7haocha.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1710821729.5174
REQUEST_TIME
1710821729
Environment Variables
empty

ThinkPHP Constants

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