[8] ErrorException in common.php line 220

未定义数组索引: HTTP_USER_AGENT

  1. }
  2. //去除两边空格
  3. function mytrim($text){
  4. if(empty($mytrim)){
  5. return null;
  6. }
  7. return trim($text);
  8. }
  9. function is_weixin() {
  10. if (strpos($_SERVER['HTTP_USER_AGENT'], 'MicroMessenger') !== false) {
  11. return true;
  12. } return false;
  13. }
  14. /**
  15. * 下载远程图片
  16. */
  17. function download($url){
  18. $ch = curl_init();
  19. curl_setopt($ch, CURLOPT_URL, $url);

Call Stack

  1. in common.php line 220
  2. at Error::appError(8, 'Undefined index: HTT...', '/www/web/5rc/public_...', 220, []) in common.php line 220
  3. at is_weixin() in IndexBaseController.php line 85
  4. at IndexBaseController->_initialize() in Controller.php line 59
  5. at Controller->__construct(object(Request))
  6. at ReflectionClass->newInstanceArgs([object(Request)]) in App.php line 359
  7. at App::invokeClass('app\index\controller...') in Loader.php line 479
  8. at Loader::controller('map', 'controller', true, 'Error') in App.php line 581
  9. at App::module(['index', 'map', 'sitemapXML'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  10. at App::exec(['type' => 'module', 'module' => ['index', 'map', 'sitemapXML'], 'convert' => false], ['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('/www/web/5rc/public_...') in index.php line 17

Environment Variables

GET Data

/sitemap_xml
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

REDIRECT_STATUS
200
HTTP_HOST
www.5rc.com
HTTP_X_REAL_IP
154.81.23.2
HTTP_CONNECTION
close
PATH
/sbin:/usr/sbin:/bin:/usr/bin
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
SERVER_NAME
www.5rc.com
SERVER_ADDR
127.0.0.1
SERVER_PORT
80
REMOTE_ADDR
154.81.23.2
DOCUMENT_ROOT
/www/web/5rc/public_html
REQUEST_SCHEME
http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT
/www/web/5rc/public_html
SERVER_ADMIN
you@example.com
SCRIPT_FILENAME
/www/web/5rc/public_html/index.php
REMOTE_PORT
37870
REDIRECT_URL
/sitemap.xml
REDIRECT_QUERY_STRING
/sitemap.xml
GATEWAY_INTERFACE
CGI/1.1
SERVER_PROTOCOL
HTTP/1.0
REQUEST_METHOD
GET
QUERY_STRING
/sitemap.xml
REQUEST_URI
/sitemap.xml
SCRIPT_NAME
/index.php
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1563953782.587
REQUEST_TIME
1563953782
PATH_INFO
/sitemap.xml
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/web/5rc/public_html/application/
THINK_VERSION
5.0.24
THINK_START_TIME
1563953782.5881
THINK_START_MEM
229376
EXT
.php
DS
/
THINK_PATH
/www/web/5rc/public_html/thinkphp/
LIB_PATH
/www/web/5rc/public_html/thinkphp/library/
CORE_PATH
/www/web/5rc/public_html/thinkphp/library/think/
TRAIT_PATH
/www/web/5rc/public_html/thinkphp/library/traits/
ROOT_PATH
/www/web/5rc/public_html/
EXTEND_PATH
/www/web/5rc/public_html/extend/
VENDOR_PATH
/www/web/5rc/public_html/vendor/
RUNTIME_PATH
/www/web/5rc/public_html/runtime/
LOG_PATH
/www/web/5rc/public_html/runtime/log/
CACHE_PATH
/www/web/5rc/public_html/runtime/cache/
TEMP_PATH
/www/web/5rc/public_html/runtime/temp/
CONF_PATH
/www/web/5rc/public_html/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false