[8] ErrorException in News.php line 66

未定义数组下标: 22

  1. $id = input('param.id/d',0);
  2. $info='';$house_info='';
  3. if($id){
  4. $info = $this->obj->where(['status'=>1,'id'=>$id])->find();
  5. if(!$info){
  6. return $this->fetch('public/404');
  7. }elseif($info['city'] != $this->cityInfo['id']){
  8. // 城市不一样重定向到正确城市
  9. $city_cache = cache('city');
  10. $this_domain = $city_cache['cate'][$info['city']]['domain'];
  11. $this->redirect(url('News/detail@'.$this_domain,['id'=>$id]));
  12. }
  13. $this->obj->where(['status'=>1,'id'=>$id])->setInc('hits');
  14. if($info['house_id']){
  15. $house_info = model('house')->field('id,title,img,city_name,area_name,average_price,address,sale_phone')->where(['id'=>$info['house_id'],'status'=>1])->find();
  16. $fuhao = empty($info['seo_keys'])?'':',';
  17. $info['seo_keys'] .= $fuhao.$house_info['title'];
  18. }

Call Stack

  1. in News.php line 66
  2. at Error::appError(8, 'Undefined offset: 22', '/www/wwwroot/www.shi...', 66, ['id' => 1723, 'info' => object(Article), 'house_info' => '', ...]) in News.php line 66
  3. at News->detail()
  4. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 224
  5. at App::invokeMethod([object(News), 'detail'], []) in App.php line 394
  6. at App::module([null, 'News', 'detail'], ['app_debug' => false, 'app_trace' => false, 'app_status' => '', ...], false) in App.php line 130
  7. at App::run() in start.php line 18
  8. at require('/www/wwwroot/www.shi...') in index.php line 17

Exception Datas

Error Context
id 1723
info { "id": 1723, "cate_id": 2, "cate_alias": "dujiabaodao", "house_id": 0, "city": 22, "title": "\u6bcf\u65e5\u4e00\u8bed\u2014\u771f\u8bda", "img": "\/uploads\/Article\/20191003\/8b0216314b4a8a3329774690f5584e88.jpg", "file": 0, "info": "<p><img src=\"\/\/img1.shijifc.com\/uploads\/image\/20191003\/1570084177759992.jpg!wm\" title=\"1570084177759992.jpg\" alt=\"6be35be229e185b29751aa59e112d0d.jpg\"\/><\/p><p><strong><span style=\"color: rgb(247, 150, 70);\">\u4e00\u5b9a\u8981\u771f\u8bda\u5730\u8ba4\u771f\u5730\u5ea6\u8fc7\u4eba\u751f\u6bcf\u4e00\u5929\u3002\u4e0d\u8981\u518d\u8f7b\u6613\u62b1\u6028\u4eba\u751f\u82e6\u77ed\uff0c\u5176\u5b9e\u6240\u6709\u7f8e\u4e3d\u7684\u98ce\u666f\u90fd\u5728\u81ea\u5df1\u7684\u5fc3\u91cc\u548c\u624b\u4e0a\uff0c\u4e0e\u5176\u62b1\u6028\u660e\u5929\u4e0d\u662f\u90a3\u4e48\u5982\u610f\uff0c\u4e0d\u5982\u628a\u4eca\u5929\u7684\u624b\u5934\u4e8b\u505a\u597d\u3002<\/span><\/strong><\/p>", "description": "\u4e00\u5b9a\u8981\u771f\u8bda\u5730\u8ba4\u771f\u5730\u5ea6\u8fc7\u4eba\u751f\u6bcf\u4e00\u5929\u3002\u4e0d\u8981\u518d\u8f7b\u6613\u62b1\u6028\u4eba\u751f\u82e6\u77ed\uff0c\u5176\u5b9e\u6240\u6709\u7f8e\u4e3d\u7684\u98ce\u666f\u90fd\u5728\u81ea\u5df1\u7684\u5fc3\u91cc\u548c\u624b\u4e0a\uff0c\u4e0e\u5176\u62b1\u6028\u660e\u5929\u4e0d\u662f\u90a3\u4e48\u5982\u610f\uff0c\u4e0d\u5982\u628a\u4eca\u5929\u7684\u624b\u5934\u4e8b\u505a\u597d\u3002...", "create_time": 1570084202, "status": 1, "ordid": 1, "seo_title": "", "seo_keys": "", "seo_desc": "", "update_time": 1570084202, "editor": null, "comefrom": "", "hits": 755, "isrec": 0, "delete_time": null, "tags": "", "user_id": 0 }
house_info
city_cache { "cate": { "4": { "id": 4, "pid": 1, "name": "\u5c71\u5357", "alias": "shannan", "is_hot": 1, "domain": "", "map": "117.749317,36.863083", "status": 1 }, "23": { "id": 23, "pid": 22, "name": "\u6ee8\u57ce\u533a", "alias": "binchengqu", "is_hot": 0, "domain": null, "map": "118.020789,37.386186", "status": 1 }, "5": { "id": 5, "pid": 1, "name": "\u5c71\u5317", "alias": "shanbei", "is_hot": 0, "domain": "", "map": "117.758338,36.881613", "status": 1 }, "27": { "id": 27, "pid": 22, "name": "\u7ecf\u6d4e\u6280\u672f\u5f00\u53d1\u533a", "alias": "jingjijishukaifaqu", "is_hot": 0, "domain": null, "map": "117.959372,37.38968", "status": 1 }, "25": { "id": 25, "pid": 22, "name": "\u9ad8\u65b0\u533a", "alias": "gaoxinqu", "is_hot": 0, "domain": null, "map": "118.091464,37.310426", "status": 1 }, "24": { "id": 24, "pid": 1, "name": "\u90b9\u5e73\u5f00\u53d1\u533a", "alias": "kaifaqu", "is_hot": 0, "domain": null, "map": "117.769186,36.88885", "status": 1 }, "6": { "id": 6, "pid": 1, "name": "\u897f\u8463", "alias": "xidong", "is_hot": 0, "domain": "", "map": "117.753472,36.814715", "status": 1 }, "28": { "id": 28, "pid": 22, "name": "\u5317\u6d77\u65b0\u533a", "alias": "beihaiqu", "is_hot": 0, "domain": null, "map": "117.87338,38.02749", "status": 1 }, "26": { "id": 26, "pid": 22, "name": "\u6cbe\u5316\u533a", "alias": "zhanhuaqu", "is_hot": 0, "domain": null, "map": "118.105319,37.705664", "status": 1 }, "29": { "id": 29, "pid": 1, "name": "\u793c\u53c1", "alias": "lisan", "is_hot": 0, "domain": null, "map": "117.824586,36.887295", "status": 1 }, "1": { "id": 1, "pid": 0, "name": "\u90b9\u5e73", "alias": "www", "is_hot": 1, "domain": "www", "map": "117.749572,36.869506", "status": 1 }, "20": { "id": 20, "pid": 1, "name": "\u53f0\u5b50", "alias": "taizi", "is_hot": 0, "domain": null, "map": "117.516357,37.097971", "status": 1 }, "19": { "id": 19, "pid": 1, "name": "\u5b59\u9547", "alias": "sunzhen", "is_hot": 0, "domain": null, "map": "117.705419,37.037348", "status": 1 }, "18": { "id": 18, "pid": 1, "name": "\u4e5d\u6237", "alias": "jiuhu", "is_hot": 0, "domain": null, "map": "117.628505,37.045595", "status": 1 }, "17": { "id": 17, "pid": 1, "name": "\u4e34\u6c60", "alias": "linchi", "is_hot": 0, "domain": null, "map": "117.791093,36.716403", "status": 1 }, "16": { "id": 16, "pid": 1, "name": "\u7801\u5934", "alias": "matou", "is_hot": 0, "domain": null, "map": "117.402587,37.033649", "status": 1 }, "15": { "id": 15, "pid": 1, "name": "\u957f\u5c71", "alias": "changshan", "is_hot": 0, "domain": null, "map": "117.878905,36.882895", "status": 1 }, "14": { "id": 14, "pid": 1, "name": "\u9752\u9633", "alias": "qingyang", "is_hot": 0, "domain": null, "map": "117.625427,36.875807", "status": 1 }, "13": { "id": 13, "pid": 1, "name": "\u597d\u751f", "alias": "haosheng", "is_hot": 0, "domain": null, "map": "117.81185,36.82363", "status": 1 }, "12": { "id": 12, "pid": 1, "name": "\u9b4f\u6865", "alias": "weiqiao", "is_hot": 0, "domain": null, "map": "117.505283,37.03497", "status": 1 }, "11": { "id": 11, "pid": 1, "name": "\u660e\u96c6", "alias": "mingji", "is_hot": 0, "domain": null, "map": "117.642337,36.933185", "status": 1 }, "7": { "id": 7, "pid": 1, "name": "\u97e9\u5e97", "alias": "handian", "is_hot": 0, "domain": "", "map": "117.71761,36.956444", "status": 1 } }, "tree": { "1": { "id": 1, "pid": 0, "name": "\u90b9\u5e73", "alias": "www", "is_hot": 1, "domain": "www", "map": "117.749572,36.869506", "status": 1, "_child": { "4": { "id": 4, "pid": 1, "name": "\u5c71\u5357", "alias": "shannan", "is_hot": 1, "domain": "", "map": "117.749317,36.863083", "status": 1 }, "5": { "id": 5, "pid": 1, "name": "\u5c71\u5317", "alias": "shanbei", "is_hot": 0, "domain": "", "map": "117.758338,36.881613", "status": 1 }, "24": { "id": 24, "pid": 1, "name": "\u90b9\u5e73\u5f00\u53d1\u533a", "alias": "kaifaqu", "is_hot": 0, "domain": null, "map": "117.769186,36.88885", "status": 1 }, "6": { "id": 6, "pid": 1, "name": "\u897f\u8463", "alias": "xidong", "is_hot": 0, "domain": "", "map": "117.753472,36.814715", "status": 1 }, "29": { "id": 29, "pid": 1, "name": "\u793c\u53c1", "alias": "lisan", "is_hot": 0, "domain": null, "map": "117.824586,36.887295", "status": 1 }, "20": { "id": 20, "pid": 1, "name": "\u53f0\u5b50", "alias": "taizi", "is_hot": 0, "domain": null, "map": "117.516357,37.097971", "status": 1 }, "19": { "id": 19, "pid": 1, "name": "\u5b59\u9547", "alias": "sunzhen", "is_hot": 0, "domain": null, "map": "117.705419,37.037348", "status": 1 }, "18": { "id": 18, "pid": 1, "name": "\u4e5d\u6237", "alias": "jiuhu", "is_hot": 0, "domain": null, "map": "117.628505,37.045595", "status": 1 }, "17": { "id": 17, "pid": 1, "name": "\u4e34\u6c60", "alias": "linchi", "is_hot": 0, "domain": null, "map": "117.791093,36.716403", "status": 1 }, "16": { "id": 16, "pid": 1, "name": "\u7801\u5934", "alias": "matou", "is_hot": 0, "domain": null, "map": "117.402587,37.033649", "status": 1 }, "15": { "id": 15, "pid": 1, "name": "\u957f\u5c71", "alias": "changshan", "is_hot": 0, "domain": null, "map": "117.878905,36.882895", "status": 1 }, "14": { "id": 14, "pid": 1, "name": "\u9752\u9633", "alias": "qingyang", "is_hot": 0, "domain": null, "map": "117.625427,36.875807", "status": 1 }, "13": { "id": 13, "pid": 1, "name": "\u597d\u751f", "alias": "haosheng", "is_hot": 0, "domain": null, "map": "117.81185,36.82363", "status": 1 }, "12": { "id": 12, "pid": 1, "name": "\u9b4f\u6865", "alias": "weiqiao", "is_hot": 0, "domain": null, "map": "117.505283,37.03497", "status": 1 }, "11": { "id": 11, "pid": 1, "name": "\u660e\u96c6", "alias": "mingji", "is_hot": 0, "domain": null, "map": "117.642337,36.933185", "status": 1 }, "7": { "id": 7, "pid": 1, "name": "\u97e9\u5e97", "alias": "handian", "is_hot": 0, "domain": "", "map": "117.71761,36.956444", "status": 1 } } } } }

Environment Variables

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

Server/Request Data

USER
www
HOME
/home/www
HTTP_HOST
www.shijifc.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
PATH_INFO
/news/1723
REDIRECT_STATUS
200
SERVER_NAME
img1.shijifc.com
SERVER_PORT
80
SERVER_ADDR
172.31.109.196
REMOTE_PORT
58984
REMOTE_ADDR
54.172.95.106
SERVER_SOFTWARE
nginx/1.20.2
GATEWAY_INTERFACE
CGI/1.1
REQUEST_SCHEME
http
SERVER_PROTOCOL
HTTP/1.1
DOCUMENT_ROOT
/www/wwwroot/www.shijifc.com/public
DOCUMENT_URI
/index.php
REQUEST_URI
/news/1723
SCRIPT_NAME
/index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD
GET
QUERY_STRING
s=/news/1723
SCRIPT_FILENAME
/www/wwwroot/www.shijifc.com/public/index.php
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711693413.672
REQUEST_TIME
1711693413
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/www.shijifc.com/public/../application/
THINK_VERSION
5.0.9
THINK_START_TIME
1711693413.6721
THINK_START_MEM
393544
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/www.shijifc.com/thinkphp/
LIB_PATH
/www/wwwroot/www.shijifc.com/thinkphp/library/
CORE_PATH
/www/wwwroot/www.shijifc.com/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/www.shijifc.com/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/www.shijifc.com/
PUBLIC_PATH
/www/wwwroot/www.shijifc.com/public/
EXTEND_PATH
/www/wwwroot/www.shijifc.com/extend/
VENDOR_PATH
/www/wwwroot/www.shijifc.com/vendor/
RUNTIME_PATH
/www/wwwroot/www.shijifc.com/runtime/
LOG_PATH
/www/wwwroot/www.shijifc.com/runtime/log/
CACHE_PATH
/www/wwwroot/www.shijifc.com/runtime/cache/
TEMP_PATH
/www/wwwroot/www.shijifc.com/runtime/temp/
CONF_PATH
/www/wwwroot/www.shijifc.com/public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
ALIBABA_CLOUD_GLOBAL_CLIENT
global
ALIBABA_CLOUD_GLOBAL_REGION
global
ALIBABA_CLOUD_TIMEOUT
15
ALIBABA_CLOUD_CONNECT_TIMEOUT
3
ALIBABA_CLOUD_STS_EXPIRE
3600
ALIBABA_CLOUD_EXPIRATION_INTERVAL
5
ALIBABA_CLOUD_INVALID_CREDENTIAL
SDK.InvalidCredential
ALIBABA_CLOUD_CLIENT_NOT_FOUND
SDK.ClientNotFound
ALIBABA_CLOUD_SERVER_UNREACHABLE
SDK.ServerUnreachable
ALIBABA_CLOUD_INVALID_REGION_ID
SDK.InvalidRegionId
ALIBABA_CLOUD_INVALID_ARGUMENT
SDK.InvalidArgument
ALIBABA_CLOUD_SERVICE_NOT_FOUND
SDK.ServiceNotFound
FILTER_VALIDATE_BOOL
258
ALIBABA_CLOUD_VERSION_NOT_FOUND
SDK.VersionNotFound
ALIBABA_CLOUD_API_NOT_FOUND
SDK.ApiNotFound
ALIBABA_CLOUD_PARSE_ERROR
SDK.ParseError
ALIBABA_CLOUD_SDK_VERSION
1.0.6
PHPEXCEL_ROOT
/www/wwwroot/www.shijifc.com/extend/PHPExcel/