[8] ErrorException in ContentForm.php line 102

Use of undefined constant data - assumed 'data'

  1. url : "api/Upload/upimg", //接口
  2. data : formdata,
  3. cache : false,
  4. processData : false, // 不处理发送的数据,因为data值是Formdata对象,不需要对数据做处理
  5. contentType : false, // 不设置Content-type请求头
  6. success : function(data){
  7. var data = \$.parseJSON(data);
  8. var html = "<div style="position: relative;margin-right: 20px;margin-bottom: 15px;width: 132px;display: inline-block;border: 1px solid #CCC;background:#EEE;">'
  9. +'<span style="display: block;width: 120px;height: 80px;border: 1px solid #F2F1F0;margin: 5px;overflow: hidden;">'
  10. +'<img src=\"'+data.url+'\" style="width: 100%;" />'
  11. +'</span>'
  12. +'<input type="hidden" name="imgs[]" value=\"'+data.url+'\" />'
  13. +'<a onclick="delImg(this);" style="z-index: 10;display: block;top: -8px;cursor:pointer;right: -8px;position:absolute;width: 20px;height: 20px;background: #CCC;border-radius:100%;text-align:center;line-height: 20px;border: 1px solid #C1C1C1;color: #555;">X</a>'
  14. +'</div>'
  15. +'$("#img-list-box").append(html);'
  16. +'},'
  17. +' error : function(){ }'
  18. +'});}'

Call Stack

  1. in ContentForm.php line 102
  2. at Error::appError(8, 'Use of undefined con...', '/www/wwwroot/lihongy...', 102, ['field' => 'thumb', 'value' => '', 'fieldinfo' => ['id' => 8, 'field' => 'thumb', 'name' => '缩略图', ...], ...]) in ContentForm.php line 102
  3. at ContentForm->image('thumb', '', ['id' => 8, 'field' => 'thumb', 'name' => '缩略图', ...]) in ContentForm.php line 27
  4. at ContentForm->get(['id' => 428, 'title' => '...', 'inputtime' => 1611379560, ...]) in Article.php line 27
  5. at Article->show()
  6. at ReflectionMethod->invokeArgs(object(Article), []) in App.php line 343
  7. at App::invokeMethod([object(Article), 'show'], []) in App.php line 611
  8. at App::module(['index', 'article', 'show'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  9. at App::exec(['type' => 'module', 'module' => ['index', 'article', 'show'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  10. at App::run() in start.php line 19
  11. at require('/www/wwwroot/lihongy...') in index.php line 10

Environment Variables

GET Data

/question/428_html
POST Data
empty
Files
empty
Cookies
empty
Session
empty

Server/Request Data

USER
www
HOME
/home/www
SCRIPT_NAME
/index.php
REQUEST_URI
/question/428.html
QUERY_STRING
/question/428.html
REQUEST_METHOD
GET
SERVER_PROTOCOL
HTTP/1.1
GATEWAY_INTERFACE
CGI/1.1
REDIRECT_QUERY_STRING
/question/428.html
REDIRECT_URL
/question/428.html
REMOTE_PORT
20000
SCRIPT_FILENAME
/www/wwwroot/lihongyu/index.php
SERVER_ADMIN
webmaster@example.com
CONTEXT_DOCUMENT_ROOT
/www/wwwroot/lihongyu
CONTEXT_PREFIX
REQUEST_SCHEME
http
DOCUMENT_ROOT
/www/wwwroot/lihongyu
REMOTE_ADDR
164.88.121.94
SERVER_PORT
80
SERVER_ADDR
118.107.32.34
SERVER_NAME
www.lihongyu.net
SERVER_SOFTWARE
Apache
SERVER_SIGNATURE
<address>Apache Server at www.lihongyu.net Port 80</address>
LD_LIBRARY_PATH
/www/server/apache/lib
PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
HTTP_ACCEPT_ENCODING
deflate, gzip
HTTP_ACCEPT
*/*
HTTP_HOST
www.lihongyu.net
HTTP_USER_AGENT
Mozilla/5.0+(compatible;+Baiduspider/2.0;++http://www.baidu.com/search/spider.html)
proxy-nokeepalive
1
REDIRECT_STATUS
200
FCGI_ROLE
RESPONDER
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1638163112.3057
REQUEST_TIME
1638163112
PATH_INFO
/question/428.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
/www/wwwroot/lihongyu/application/
__FIVEROOT__
THINK_VERSION
5.0.24
THINK_START_TIME
1638163112.3065
THINK_START_MEM
382576
EXT
.php
DS
/
THINK_PATH
/www/wwwroot/lihongyu/thinkphp/
LIB_PATH
/www/wwwroot/lihongyu/thinkphp/library/
CORE_PATH
/www/wwwroot/lihongyu/thinkphp/library/think/
TRAIT_PATH
/www/wwwroot/lihongyu/thinkphp/library/traits/
ROOT_PATH
/www/wwwroot/lihongyu/
EXTEND_PATH
/www/wwwroot/lihongyu/extend/
VENDOR_PATH
/www/wwwroot/lihongyu/vendor/
RUNTIME_PATH
/www/wwwroot/lihongyu/runtime/
LOG_PATH
/www/wwwroot/lihongyu/runtime/log/
CACHE_PATH
/www/wwwroot/lihongyu/runtime/cache/
TEMP_PATH
/www/wwwroot/lihongyu/runtime/temp/
CONF_PATH
/www/wwwroot/lihongyu/application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false