[8] ErrorException in Content.php line 162

未定义数组下标: 1

  1. $arr = explode('/', $pathinfo);
  2. // dump($arr);
  3. // 判断 url 有没有 语言标识
  4. if (!in_array(cookie('home_lang'), $arr)) {
  5. // echo $arr[0];
  6. return '/' . $arr[0];
  7. } else {
  8. //其他语言 url 有 语言标识
  9. return '/' . $arr[0] . '/' . $arr[1];
  10. }
  11. }
  12. // 根据父类id找所有子类 id,包括全部层级
  13. public function get_ids($pid)
  14. {
  15. $data = Db::name('cate')->field('id,pid')->select();
  16. $res = get_ids($data, $pid);
  17. $res[] = intval($pid);

Call Stack

  1. in Content.php line 162
  2. at Error::appError(8, 'Undefined offset: 1', '/home/wwwroot/eflyen...', 162, ['pathinfo' => 'cn', 'arr' => ['cn']]) in Content.php line 162
  3. at Content->pa() in Content.php line 20
  4. at Content->get_list(29, '', 3, 'content', '', 'a:0:{}', 'is_top desc,sort,id ...', 1, 1, 0, 0, 0) in beb02153f37ad1a9caaebe789626b728.php line 569
  5. at include('/home/wwwroot/eflyen...') in File.php line 59
  6. at File->read('/home/wwwroot/eflyen...', ['links' => [], 'homelink' => '/', 'cateid' => 0, ...]) in Template.php line 226
  7. at Template->fetch('/home/wwwroot/eflyen...', ['links' => [], 'homelink' => '/', 'cateid' => 0, ...], []) in Think.php line 93
  8. at Think->fetch('/home/wwwroot/eflyen...', ['links' => [], 'homelink' => '/', 'cateid' => 0, ...], []) in View.php line 192
  9. at View->fetch('index@/cn/index', ['links' => [], 'homelink' => '/', 'cateid' => 0, ...], [], false) in View.php line 42
  10. at View->output('index@/cn/index') in Response.php line 396
  11. at Response->getContent() in Response.php line 128
  12. at Response->send() in index.php line 24

Environment Variables

GET Data
/cn
PHPSESSID 9747298de835e9c32060c9fff978fa8b
POST Dataempty
Filesempty
Cookies
home_lang cn
Sessionempty
Server/Request Data
USER eflyenergycom
HOME /home/wwwroot/eflyenergycom
SCRIPT_NAME /index.php
REQUEST_URI /cn?PHPSESSID=9747298de835e9c32060c9fff978fa8b
QUERY_STRING /cn&PHPSESSID=9747298de835e9c32060c9fff978fa8b
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /cn&PHPSESSID=9747298de835e9c32060c9fff978fa8b
REDIRECT_URL /cn
REMOTE_PORT 38584
SCRIPT_FILENAME /home/wwwroot/eflyenergycom/wwwroot/index.php
SERVER_ADMIN [no address given]
CONTEXT_DOCUMENT_ROOT /home/wwwroot/eflyenergycom/wwwroot
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT /home/wwwroot/eflyenergycom/wwwroot
REMOTE_ADDR 54.152.5.73
SERVER_PORT 80
SERVER_ADDR 127.0.0.1
SERVER_NAME e-flyenergy.com
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
HTTP_CONNECTION close
HTTP_HOST e-flyenergy.com
HTTP_X_REAL_IP 54.152.5.73
proxy-nokeepalive 1
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711670230.113
REQUEST_TIME 1711670230
Environment Variablesempty
ThinkPHP Constants
PINYIN_DEFAULT 4096
PINYIN_TONE 2
PINYIN_NO_TONE 4
PINYIN_ASCII_TONE 8
PINYIN_NAME 16
PINYIN_KEEP_NUMBER 32
PINYIN_KEEP_ENGLISH 64
PINYIN_UMLAUT_V 128
PINYIN_KEEP_PUNCTUATION 256
QINIU_FUNCTIONS_VERSION 7.4.0