[8] ErrorException in Product.php line 15

未定义变量: rs

  1. class Product extends Model
  2. {
  3. //进入详情页后商品点击量增加
  4. public function productHitsAddOneByUrlName($urlname){
  5. $data = $this->where('urlname',$urlname)->find();
  6. if($data){
  7. $rs = $this->where('urlname',$urlname)->setInc('hits');
  8. }
  9. return $rs;
  10. }
  11. //获取产品中心的子栏目
  12. public function getProcateData(){
  13. $data = db('procate')->where('parentid',0)->where('ischeck',1)
  14. ->order('id asc')
  15. ->select();
  16. return $data;
  17. }

Call Stack

  1. in Product.php line 15
  2. at Error::appError(8, 'Undefined variable: ...', 'D:\wwwroot\hflslaser...', 15, ['urlname' => 'wbz2', 'data' => null]) in Product.php line 15
  3. at Product->productHitsAddOneByUrlName('wbz2') in Product.php line 67
  4. at Product->details()
  5. at ReflectionMethod->invokeArgs(object(Product), []) in App.php line 343
  6. at App::invokeMethod([object(Product), 'details'], []) in App.php line 611
  7. at App::module([null, 'product', 'details'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 457
  8. at App::exec(['type' => 'module', 'module' => [null, 'product', 'details'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  9. at App::run() in start.php line 18
  10. at require('D:\wwwroot\hflslaser...') in index.php line 17

Exception Datas

Error Context
urlname wbz2
data Resource

Environment Variables

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

Server/Request Data

PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\
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
D:/phpstudy_pro/Extensions/php/php5.6.9nts
_FCGI_SHUTDOWN_EVENT_
9156
HTTP_CONNECTION
close
SCRIPT_NAME
/index.php
REQUEST_URI
/pro/wbz2.html
QUERY_STRING
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_URL
/pro/wbz2.html
REMOTE_PORT
56656
SCRIPT_FILENAME
D:/wwwroot/hflslaser.com/public/index.php
SERVER_ADMIN
admin@example.com
CONTEXT_DOCUMENT_ROOT
D:/wwwroot/hflslaser.com/public
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
D:/wwwroot/hflslaser.com/public
REMOTE_ADDR
3.94.150.98
SERVER_PORT
80
SERVER_ADDR
172.16.238.226
SERVER_NAME
www.hflslaser.com
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
SystemRoot
C:\Windows
HTTP_HOST
www.hflslaser.com
HTTP_USER_AGENT
claudebot
HTTP_ACCEPT
*/*
REDIRECT_STATUS
200
REDIRECT_PATH_INFO
pro/wbz2.html
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1711635366.778
REQUEST_TIME
1711635366
PATH_INFO
pro/wbz2.html
Environment Variables
empty

ThinkPHP Constants

PUBILC_PATH
D:\wwwroot\hflslaser.com\public/
APP_PATH
D:\wwwroot\hflslaser.com\public/../application/
THINK_VERSION
5.0.11
THINK_START_TIME
1711635366.7789
THINK_START_MEM
256304
EXT
.php
DS
\
THINK_PATH
D:\wwwroot\hflslaser.com\thinkphp\
LIB_PATH
D:\wwwroot\hflslaser.com\thinkphp\library\
CORE_PATH
D:\wwwroot\hflslaser.com\thinkphp\library\think\
TRAIT_PATH
D:\wwwroot\hflslaser.com\thinkphp\library\traits\
ROOT_PATH
D:\wwwroot\hflslaser.com\
EXTEND_PATH
D:\wwwroot\hflslaser.com\extend\
VENDOR_PATH
D:\wwwroot\hflslaser.com\vendor\
RUNTIME_PATH
D:\wwwroot\hflslaser.com\runtime\
LOG_PATH
D:\wwwroot\hflslaser.com\runtime\log\
CACHE_PATH
D:\wwwroot\hflslaser.com\runtime\cache\
TEMP_PATH
D:\wwwroot\hflslaser.com\runtime\temp\
CONF_PATH
D:\wwwroot\hflslaser.com\public/../application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
true