[8] ErrorException in SolutionDetail.php line 21

未定义数组索引: click

  1. use app\common\model\Casecat;
  2. use app\common\model\Cases;
  3. class SolutionDetail extends Common
  4. {
  5. public function index()
  6. {
  7. $param = $this->request->param('id');
  8. $case = Cases::get($param);
  9. $case['click'] += 1;
  10. $case->save();
  11. $case['add_time'] = date("Y-m-d", strtotime($case->add_time));
  12. //上一条
  13. $pre = Cases::where('id', '<', $param)->field('id,title')->order('id desc')->find();
  14. //下一条
  15. $next = Cases::where('id', '>', $param)->field('id,title')->find();

Call Stack

  1. in SolutionDetail.php line 21
  2. at Error::appError(8, 'Undefined index: cli...', '/www/wwwroot/www.hti...', 21, ['param' => '74', 'case' => ['click' => 0]]) in SolutionDetail.php line 21
  3. at SolutionDetail->index()
  4. at ReflectionMethod->invokeArgs(object(SolutionDetail), []) in Container.php line 395
  5. at Container->invokeReflectMethod(object(SolutionDetail), object(ReflectionMethod), ['id' => '74', 'convert' => false]) in Module.php line 131
  6. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  7. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  8. at Middleware->think\{closure}(object(Request)) in Check.php line 28
  9. at Check->handle(object(Request), object(Closure), null)
  10. at call_user_func_array([object(Check), 'handle'], [object(Request), object(Closure), null]) in Middleware.php line 185
  11. at Middleware->think\{closure}(object(Request))
  12. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  13. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  14. at Module->exec() in Dispatch.php line 168
  15. at Dispatch->run() in App.php line 432
  16. at App->think\{closure}(object(Request), object(Closure), null)
  17. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  18. at Middleware->think\{closure}(object(Request))
  19. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  20. at Middleware->dispatch(object(Request)) in App.php line 435
  21. at App->run() in index.php line 21

Environment Variables

GET Data
id 74
POST Dataempty
Filesempty
Cookies
think_var zh-cn
Sessionempty
Server/Request Data
USER www
HOME /home/www
HTTP_HOST www.htianh.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
PATH_INFO
REDIRECT_STATUS 200
SERVER_NAME www.htianh.com
SERVER_PORT 80
SERVER_ADDR 172.16.165.193
REMOTE_PORT 43062
REMOTE_ADDR 3.87.133.69
SERVER_SOFTWARE nginx/1.22.1
GATEWAY_INTERFACE CGI/1.1
REQUEST_SCHEME http
SERVER_PROTOCOL HTTP/1.1
DOCUMENT_ROOT /www/wwwroot/www.htianh.com/root
DOCUMENT_URI /index.php
REQUEST_URI /solutionDetail.html?id=74
SCRIPT_NAME /index.php
CONTENT_LENGTH
CONTENT_TYPE
REQUEST_METHOD GET
QUERY_STRING s=/solutionDetail.html&id=74
SCRIPT_FILENAME /www/wwwroot/www.htianh.com/root/index.php
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711652529.3513
REQUEST_TIME 1711652529
Environment Variablesempty
ThinkPHP Constants
SESSION_EXP_TIME 3600
CACHE_TAG_ZWUSER zwuser
CACHE_TAG_LOG userlog
CACHE_TAG_ROLE userrole
CACHE_TAG_CAT usercat
CACHE_TAG_PRODUCT userproduct
CACHE_TAG_ARCHIVE archive
CACHE_TAG_COMPANYINFORMATION companyinformation
CACHE_TAG_CASECAT usercasecat
CACHE_TAG_CASE usercase
CACHE_TAG_NEWSCAT newscat
CACHE_TAG_NEWS usernews
CACHE_TAG_RECRUIT recruit
CACHE_TAG_MESSAGE usermessage
CACHE_TAG_NAVIGATIONCONTENT navigationcontent
CACHE_TAG_COOPERATIVEPARTNER cooperativepartner
CACHE_TAG_FRIENDLYLINK friendlylink
CACHE_TAG_WXCONFIG userwxconfig
CACHE_TAG_WXREPLY userwxreply
CACHE_TAG_SITECAT sitecat
CACHE_TAG_SITEPAGE sitepage
CACHE_TAG_SITELIST sitelist
CACHE_TAG_ADMIN_AUTH adminauth
CACHE_TAG_AGENT_AUTH agentauth
CACHE_TAG_USER_RULE userauth
UPLOAD_DIR up_file
A_MONEY 1
A_MONEY_STR 余额
ADMIN_RECHARGE 1
AGENT_OPENSITE 2
AGENT_UPDATESITE 3
THINK_START_TIME 1711652529.3575
THINK_START_MEM 824656
EXT .php
DS /
THINK_PATH /www/wwwroot/www.htianh.com/application/
LIB_PATH /www/wwwroot/www.htianh.com/application/library/
CORE_PATH /www/wwwroot/www.htianh.com/application/library/think/
TRAIT_PATH /www/wwwroot/www.htianh.com/application/library/traits/
APP_PATH /www/wwwroot/www.htianh.com/root/
ROOT_PATH /www/wwwroot/www.htianh.com/
EXTEND_PATH /www/wwwroot/www.htianh.com/extend/
VENDOR_PATH /www/wwwroot/www.htianh.com/vendor/
RUNTIME_PATH /www/wwwroot/www.htianh.com/runtime/
LOG_PATH /www/wwwroot/www.htianh.com/runtime/log/
CACHE_PATH /www/wwwroot/www.htianh.com/runtime/cache/
TEMP_PATH /www/wwwroot/www.htianh.com/runtime/temp/
CONF_PATH /www/wwwroot/www.htianh.com/root/
CONF_EXT .php
ENV_PREFIX PHP_
MODULAR_TAG modular