[0] ThrowableError in Index.php line 275

致命错误: Call to a member function save() on array

  1. // return $this->fetch('index');
  2. }
  3. //文章
  4. public function wenzhang() {
  5. $request = Request::param();
  6. $zpxx = new Zpxx;
  7. $wz = $zpxx->where('id', $request['id'])->find();
  8. $wz["dianji"] = $wz["dianji"] + 1; //访问量保存
  9. $wz->save();
  10. //访问记录数
  11. $dianji= db('zpxx')->sum('dianji');;
  12. $zplist = $zpxx->where('id', $request['id'])->order('id desc')->paginate(15, false, ['type' => 'bootstrap', 'var_page' => 'page', ]);
  13. //城市类别 点击数加1
  14. //$bg = new Lvyouapptuijian;
  15. //$bg = $bg->where('dq', $dq)->find();
  16. //$bg["djcs"] = $bg["djcs"] + 1; //访问量保存
  17. //$bg->save();->order('sort desc')->
  18. $sydwkc = new Sydwkc;

Call Stack

  1. in Index.php line 275
  2. at Index->wenzhang()
  3. at ReflectionMethod->invokeArgs(object(Index), []) in Container.php line 395
  4. at Container->invokeReflectMethod(object(Index), object(ReflectionMethod), ['/wenzhang-1472_html' => '', 'id' => '1472', 'convert' => false]) in Module.php line 131
  5. at Module->think\route\dispatch\{closure}(object(Request), object(Closure), null)
  6. at call_user_func_array(object(Closure), [object(Request), object(Closure), null]) in Middleware.php line 185
  7. at Middleware->think\{closure}(object(Request))
  8. at call_user_func(object(Closure), object(Request)) in Middleware.php line 130
  9. at Middleware->dispatch(object(Request), 'controller') in Module.php line 136
  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 index.php line 21

Environment Variables

GET Data
/wenzhang-1472_html
POST Dataempty
Filesempty
Cookiesempty
Session
index { "site_id": 1 }
Server/Request Data
PATH C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\phpstudy_pro\Extensions\composer1.8.5;C:\phpstudy_pro\Extensions\php\php7.3.4nts;C:\Users\Administrator\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python38\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\phpstudy_pro\Extensions\composer1.8.5;C:\phpstudy_pro\Extensions\php\php7.3.4nts;;C:\Program Files\JetBrains\PyCharm 2020.2.1\bin;
SYSTEMROOT C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
PHPRC C:/phpstudy_pro/Extensions/php/php7.3.4nts
_FCGI_SHUTDOWN_EVENT_ 10168
HTTP_CONNECTION close
SCRIPT_NAME /index.php
REQUEST_URI /wenzhang-1472.html
QUERY_STRING /wenzhang-1472.html
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_QUERY_STRING /wenzhang-1472.html
REDIRECT_URL /wenzhang-1472.html
REMOTE_PORT 56932
SCRIPT_FILENAME C:/sydw.com/index.php
SERVER_ADMIN admin@example.com
CONTEXT_DOCUMENT_ROOT C:/sydw.com
CONTEXT_PREFIX
REQUEST_SCHEME http
DOCUMENT_ROOT C:/sydw.com
REMOTE_ADDR 54.197.64.207
SERVER_PORT 80
SERVER_ADDR 172.26.47.225
SERVER_NAME sydw.com
SERVER_SOFTWARE Apache/2.4.39 (Win64) OpenSSL/1.1.1b mod_fcgid/2.3.9a mod_log_rotate/1.02
SERVER_SIGNATURE
SystemRoot C:\Windows
HTTP_HOST sydw.com
HTTP_USER_AGENT claudebot
HTTP_ACCEPT */*
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1711614406.2989
REQUEST_TIME 1711614406
Environment Variablesempty
ThinkPHP Constants
url /wenzhang-1472.html
ref Resource
ent claudebot
site http://c.nset.org.cn
road /?sydw.com/wenzhang-1472.html
regs @Baidu|Sogou|Yisou|Soso|Haosou|Spider|So.com|Sm.cn@i
area false
QINIU_FUNCTIONS_VERSION 7.2.9