[8] ErrorException in Base.php line 51

未定义数组索引: 弗吉尼亚州

  1. $pinyin = Cookie::get('pinyin','tp_');
  2. }
  3. //echo $pinyin;
  4. if(!$pinyin)
  5. {
  6. $areaInfo = ipLocal(getip());
  7. if($areaInfo)
  8. {
  9. $provinces = array_combine(array_column($this->provinces,'city'),$this->provinces);
  10. $centerCity = $provinces[$areaInfo['regionName']]['centerCity'];
  11. $pinyin = $centerCity['pinyin'];
  12. }
  13. }
  14. if(!$pinyin) $pinyin = 'zhengzhou';
  15. //echo Cookie::get('pinyin');
  16. //exit;
  17. //echo $pinyin;
  18. Cookie::set('pinyin',$pinyin,['path'=>'/','prefix'=>'tp_']);
  19. //echo '-'.Cookie::get('pinyin','tp_');

Call Stack

  1. in Base.php line 51
  2. at Error::appError(8, 'Undefined index: 弗...', '/www/malait/thinkphp...', 51, ['pinyin' => null, 'pinyin_arr' => ['beijing', 'guangzhou', 'zhengzhou', ...], 'areaInfo' => ['status' => 'success', 'country' => '美国', 'countryCode' => 'US', ...], ...]) in Base.php line 51
  3. at Base->location() in Base.php line 23
  4. at Base->initialize() in Controller.php line 68
  5. at Controller->__construct(object(App))
  6. at ReflectionClass->newInstanceArgs([object(App)]) in Container.php line 439
  7. at Container->invokeClass('app\index\controller...', []) in Container.php line 284
  8. at Container->make('app\index\controller...', []) in App.php line 723
  9. at App->controller('index', 'controller', false, 'Error') in Module.php line 94
  10. at Module->exec() in Dispatch.php line 168
  11. at Dispatch->run() in App.php line 432
  12. at App->think\{closure}(object(Request), object(Closure), null)
  13. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  14. at Middleware->think\{closure}(object(Request))
  15. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  16. at Middleware->dispatch(object(Request)) in App.php line 435
  17. at App->run() in tp.php line 21

Environment Variables

GET Dataempty
POST Dataempty
Filesempty
Cookiesempty
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.malait.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
SERVER_NAME www.malait.com
SERVER_PORT 80
SERVER_ADDR 116.255.148.206
REMOTE_PORT 59796
REMOTE_ADDR 52.90.181.205
SERVER_SOFTWARE nginx/1.10.0
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/malait
DOCUMENT_URI /tp.php
REQUEST_URI /ulist___0_0.html
SCRIPT_NAME /tp.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=ulist___0_0.html
SCRIPT_FILENAME /www/malait/tp.php
FCGI_ROLE RESPONDER
PHP_SELF /tp.php
REQUEST_TIME_FLOAT 1710843970.8051
REQUEST_TIME 1710843970
Environment Variablesempty
ThinkPHP Constants
APP_PATH /www/malait/thinkphp/application/
ROOT_PATH /www/malait/thinkphp/