[2] ErrorException in global.php line 661

file_get_contents(http://www.wdunncpa.com/api.php/category/lists?contentid=202&categoryname=其它公告): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway

  1. foreach ($param as $key => $value) {
  2. $apiurl.=$key."=".$value.'&';
  3. }
  4. $apiurl = rtrim($apiurl,'&');
  5. // echo $apiurl;die;
  6. // $time1 = microtime(true);
  7. // $datatext = '';
  8. $file_open_time = time();
  9. $datatext=file_get_contents($apiurl);
  10. $file_open_time = time() - $file_open_time;
  11. // 写入接口查询记录 频次 运行时间
  12. $file_name = RUNTIME_PATH.'cache'.date('Y-m-d',time()).'.txt';
  13. $my_file = fopen($file_name, "a");
  14. $file_content = date('Y-m-d H:i:s',time())." $api"." $file_open_time\n";
  15. fwrite($my_file, $file_content);
  16. fclose($my_file);
  17. // $handle = fopen($apiurl,'r');
  18. // do {

Call Stack

  1. in global.php line 661
  2. at Error::appError(2, 'file_get_contents(ht...', '/alidata1/wwwroot/ww...', 661, ['api' => 'category/lists', 'param' => ['contentid' => '202', 'categoryname' => '其它公告'], 'location' => ['data'], ...])
  3. at file_get_contents('http://www.bjraxfxx....') in global.php line 661
  4. at apidata('category/lists', ['contentid' => '202', 'categoryname' => '其它公告']) in Base.php line 43
  5. at Base->_initialize() in Content.php line 10
  6. at Content->_initialize() in Controller.php line 53
  7. at Controller->__construct(object(Request)) in Loader.php line 409
  8. at Loader::controller('content', 'controller', false, 'Error') in App.php line 339
  9. at App::module(['pc', 'content', 'details'], ['app_namespace' => 'app', 'app_debug' => true, 'app_trace' => false, ...], null) in App.php line 133
  10. at App::run() in start.php line 18
  11. at require('/alidata1/wwwroot/ww...') in DuihaoJO.php line 25
  12. at require('/alidata1/wwwroot/ww...') in index.php line 23

Exception Datas

Error Context
api category/lists
param { "contentid": "202", "categoryname": "\u5176\u5b83\u516c\u544a" }
location [ "data" ]
data []
apiurl http://www.wdunncpa.com/api.php/category/lists?contentid=202&categoryname=其它公告
key categoryname
value 其它公告
file_open_time 1572384874
http_response_header [ "HTTP\/1.1 502 Bad Gateway", "Server: Tengine", "Date: Tue, 29 Oct 2019 21:34:34 GMT", "Content-Type: text\/html", "Content-Length: 96", "Connection: close", "Set-Cookie: acw_tc=2760828215723848743683609eef5dbebdfd142ff998f65a2966384fca103f;path=\/;HttpOnly;Max-Age=2678401", "Set-Cookie: acw_tc=2760828215723848743683609eef5dbebdfd142ff998f65a2966384fca103f;path=\/;HttpOnly;Max-Age=2678401", "ETag: \"5dae82cc-60\"" ]

Environment Variables

GET Data
contentid 202
categoryname 其它公告
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
TEMP /tmp
TMPDIR /tmp
TMP /tmp
PATH /usr/local/bin:/usr/bin:/bin
USER www
HOME /home/www
FCGI_ROLE RESPONDER
SCRIPT_FILENAME /alidata1/wwwroot/www.wdunncpa.com/index.php
QUERY_STRING s=/content/details&contentid=202&categoryname=%E5%85%B6%E5%AE%83%E5%85%AC%E5%91%8A
REQUEST_METHOD GET
CONTENT_TYPE
CONTENT_LENGTH
SCRIPT_NAME /index.php
REQUEST_URI /index.php/content/details?contentid=202&categoryname=%E5%85%B6%E5%AE%83%E5%85%AC%E5%91%8A
DOCUMENT_URI /index.php
DOCUMENT_ROOT /alidata1/wwwroot/www.wdunncpa.com
SERVER_PROTOCOL HTTP/1.1
REQUEST_SCHEME http
GATEWAY_INTERFACE CGI/1.1
SERVER_SOFTWARE nginx/1.14.0
REMOTE_ADDR 39.96.130.100
REMOTE_PORT 44498
SERVER_ADDR 172.26.115.190
SERVER_PORT 80
SERVER_NAME www.wdunncpa.com
REDIRECT_STATUS 200
HTTP_HOST www.wdunncpa.com
HTTP_USER_AGENT Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0); 360Spider(compatible; HaosouSpider; http://www.haosou.com/help/help_3_2.html)
HTTP_X_TRUE_IP 45.35.226.74
HTTP_X_REAL_IP 45.35.226.74
HTTP_WEB_SERVER_TYPE nginx
HTTP_WL_PROXY_CLIENT_IP 45.35.226.74
HTTP_X_FORWARDED_FOR 45.35.226.74
HTTP_X_FORWARDED_PROTO http
HTTP_X_FORWARDED_CLUSTER waf,
HTTP_EAGLEEYE_TRACEID 2760826415723848743292225ebeb4
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT */*
HTTP_EAGLEEYE_RPCID 0.1
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1572384874.3383
REQUEST_TIME 1572384874
PATH_INFO /content/details
Environment Variablesempty
ThinkPHP Constants
BIND_MODULE pc
APP_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../apps/
RUNTIME_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../runtime/
APP_DEBUG true
DUIHAO_ROOT /alidata1/wwwroot/www.wdunncpa.com/
MICROTIME_START 0.33889400 1572384874
IN_DUIHAO true
MAGIC_QUOTES_GPC false
TIME 1572384874
EXT_DIR /alidata1/wwwroot/www.wdunncpa.com/extend/
CACHE_DIR /alidata1/wwwroot/www.wdunncpa.com/runtime/cache/
APP_DIR /alidata1/wwwroot/www.wdunncpa.com/apps/
ADMIN_DIR /alidata1/wwwroot/www.wdunncpa.com/apps/admin/
DB_HOST rm-8vbp93t1q6309y708.mysql.zhangbei.rds.aliyuncs.com
DB_USER bjraxfxx
DB_PW q6309Y708#$%vbp93t1
DB_NAME ronganxiaofang_db
DB_PRE jo3_
DB_CHARSET utf8
DB_PCONNECT 0
DB_DATABASE mysql
COOKIE_PATH /
COOKIE_PRE dSBmnAEGLK
COOKIE_TTL 36000
APIURL http://www.wdunncpa.com/api.php/
THINK_VERSION 5.0.0 RC4
THINK_START_TIME 1572384874.3409
THINK_START_MEM 509720
EXT .php
DS /
THINK_PATH /alidata1/wwwroot/www.wdunncpa.com/framework/
LIB_PATH /alidata1/wwwroot/www.wdunncpa.com/framework/library/
CORE_PATH /alidata1/wwwroot/www.wdunncpa.com/framework/library/think/
TRAIT_PATH /alidata1/wwwroot/www.wdunncpa.com/framework/library/traits/
ROOT_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../
EXTEND_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../extend/
VENDOR_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../vendor/
LOG_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../runtime/log/
CACHE_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../runtime/cache/
TEMP_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../runtime/temp/
CONF_PATH /alidata1/wwwroot/www.wdunncpa.com/include/../apps/
CONF_EXT .php
ENV_PREFIX PHP_
IS_CLI false
IS_WIN false
UPLOAD_ROOT /upload/