[0] Exception in Mysql.php line 113

不支持的数据表达式:rand()

  1. if ('__TABLE__' == $table) {
  2. $table = $this->query->getTable();
  3. }
  4. if (isset($options['alias'][$table])) {
  5. $table = $options['alias'][$table];
  6. }
  7. }
  8. if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) {
  9. throw new Exception('not support data:' . $key);
  10. }
  11. if ('*' != $key && ($strict || !preg_match('/[,\'\"\*\(\)`.\s]/', $key))) {
  12. $key = '`' . $key . '`';
  13. }
  14. if (isset($table)) {
  15. if (strpos($table, '.')) {
  16. $table = str_replace('.', '`.`', $table);
  17. }
  18. $key = '`' . $table . '`.' . $key;

Call Stack

  1. in Mysql.php line 113
  2. at Mysql->parseKey('rand()', ['multi' => ['AND' => ['goods_recommend' => [['eq', 1]]]], 'where' => ['AND' => ['goods_recommend' => ['eq', 1]]], 'order' => ['rand()'], ...], true) in Builder.php line 596
  3. at Builder->parseOrder(['rand()'], ['multi' => ['AND' => ['goods_recommend' => [['eq', 1]]]], 'where' => ['AND' => ['goods_recommend' => ['eq', 1]]], 'order' => ['rand()'], ...]) in Builder.php line 722
  4. at Builder->select(['multi' => ['AND' => ['goods_recommend' => [['eq', 1]]]], 'where' => ['AND' => ['goods_recommend' => ['eq', 1]]], 'order' => ['rand()'], ...]) in Query.php line 2511
  5. at Query->select() in News.php line 94
  6. at News->newsDetail()
  7. at ReflectionMethod->invokeArgs(object(News), []) in App.php line 343
  8. at App::invokeMethod([object(News), 'newsDetail'], []) in App.php line 611
  9. at App::module(['index', 'news', 'newsDetail'], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...], false) in App.php line 456
  10. at App::exec(['type' => 'module', 'module' => ['index', 'news', 'newsDetail'], 'convert' => false], ['app_host' => '', 'app_debug' => true, 'app_trace' => false, ...]) in App.php line 139
  11. at App::run() in start.php line 19
  12. at require('/usr/home/wh-abhr8d5...') in index.php line 61

Environment Variables

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

Server/Request Data

DOCUMENT_ROOT
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs
GATEWAY_INTERFACE
CGI/1.1
HTTP_ACCEPT
*/*
HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
HTTP_CONNECTION
close
HTTP_HOST
hnlfmq.com
HTTP_REMOTE_HOST
18.222.179.96
HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HTTP_X_FORWARDED_FOR
18.222.179.96
HTTP_X_FORWARDED_PROTO
http
HTTP_X_REAL_IP
18.222.179.96
PATH
/bin
PHPRC
/var/www/php74/hichina_ini/wh-abhr8d5hrebog4gi3dj
QUERY_STRING
REDIRECT_DOCUMENT_ROOT
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs
REDIRECT_GATEWAY_INTERFACE
CGI/1.1
REDIRECT_HTTP_ACCEPT
*/*
REDIRECT_HTTP_ACCEPT_ENCODING
gzip, br, zstd, deflate
REDIRECT_HTTP_CONNECTION
close
REDIRECT_HTTP_HOST
hnlfmq.com
REDIRECT_HTTP_REMOTE_HOST
18.222.179.96
REDIRECT_HTTP_USER_AGENT
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
REDIRECT_HTTP_X_FORWARDED_FOR
18.222.179.96
REDIRECT_HTTP_X_FORWARDED_PROTO
http
REDIRECT_HTTP_X_REAL_IP
18.222.179.96
REDIRECT_PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
REDIRECT_PATH_INFO
newsDetail/65.html
REDIRECT_PATH_TRANSLATED
redirect:/index.php
REDIRECT_QUERY_STRING
REDIRECT_REMOTE_ADDR
10.0.46.251
REDIRECT_REMOTE_PORT
57242
REDIRECT_REQUEST_METHOD
GET
REDIRECT_REQUEST_URI
/newsDetail/65.html
REDIRECT_SCRIPT_FILENAME
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/newsDetail
REDIRECT_SCRIPT_NAME
/newsDetail
REDIRECT_SCRIPT_URI
http://hnlfmq.com/newsDetail/65.html
REDIRECT_SCRIPT_URL
/newsDetail/65.html
REDIRECT_SERVER_ADDR
10.0.31.213
REDIRECT_SERVER_ADMIN
webmaster@wh-abhr8d5hrebog4gi3dj.my3w.com
REDIRECT_SERVER_NAME
hnlfmq.com
REDIRECT_SERVER_PORT
80
REDIRECT_SERVER_PROTOCOL
HTTP/1.0
REDIRECT_SERVER_SIGNATURE
REDIRECT_SERVER_SOFTWARE
Apache
REDIRECT_STATUS
200
REDIRECT_TZ
Asia/Shanghai
REDIRECT_UNIQUE_ID
Z2emRwoAH9UAPkSn@@wAAAAA
REDIRECT_URL
/newsDetail/65.html
REMOTE_ADDR
10.0.46.251
REMOTE_PORT
57242
REQUEST_METHOD
GET
REQUEST_URI
/newsDetail/65.html
SCRIPT_FILENAME
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/index.php
SCRIPT_NAME
/index.php
SCRIPT_URI
http://hnlfmq.com/newsDetail/65.html
SCRIPT_URL
/newsDetail/65.html
SERVER_ADDR
10.0.31.213
SERVER_ADMIN
webmaster@wh-abhr8d5hrebog4gi3dj.my3w.com
SERVER_NAME
hnlfmq.com
SERVER_PORT
80
SERVER_PROTOCOL
HTTP/1.0
SERVER_SIGNATURE
SERVER_SOFTWARE
Apache
TZ
Asia/Shanghai
UNIQUE_ID
Z2emRwoAH9UAPkSn@@wAAAAA
PHP_SELF
/index.php
REQUEST_TIME_FLOAT
1734846023.1821
REQUEST_TIME
1734846023
PATH_INFO
newsDetail/65.html
Environment Variables
empty

ThinkPHP Constants

APP_PATH
./application/
THINK_VERSION
5.0.24
THINK_START_TIME
1734846023.183
THINK_START_MEM
356592
EXT
.php
DS
/
THINK_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/thinkphp/
LIB_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/thinkphp/library/
CORE_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/thinkphp/library/think/
TRAIT_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/thinkphp/library/traits/
ROOT_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/
EXTEND_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/extend/
VENDOR_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/vendor/
RUNTIME_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/runtime/
LOG_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/runtime/log/
CACHE_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/runtime/cache/
TEMP_PATH
/usr/home/wh-abhr8d5hrebog4gi3dj/htdocs/runtime/temp/
CONF_PATH
./application/
CONF_EXT
.php
ENV_PREFIX
PHP_
IS_CLI
false
IS_WIN
false
FILTER_VALIDATE_BOOL
258
U_IDNA_PROHIBITED_ERROR
66560
U_IDNA_ERROR_START
66560
U_IDNA_UNASSIGNED_ERROR
66561
U_IDNA_CHECK_BIDI_ERROR
66562
U_IDNA_STD3_ASCII_RULES_ERROR
66563
U_IDNA_ACE_PREFIX_ERROR
66564
U_IDNA_VERIFICATION_ERROR
66565
U_IDNA_LABEL_TOO_LONG_ERROR
66566
U_IDNA_ZERO_LENGTH_LABEL_ERROR
66567
U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR
66568
U_IDNA_ERROR_LIMIT
66569
U_STRINGPREP_PROHIBITED_ERROR
66560
U_STRINGPREP_UNASSIGNED_ERROR
66561
U_STRINGPREP_CHECK_BIDI_ERROR
66562
IDNA_DEFAULT
0
IDNA_ALLOW_UNASSIGNED
1
IDNA_USE_STD3_RULES
2
IDNA_CHECK_BIDI
4
IDNA_CHECK_CONTEXTJ
8
IDNA_NONTRANSITIONAL_TO_ASCII
16
IDNA_NONTRANSITIONAL_TO_UNICODE
32
INTL_IDNA_VARIANT_2003
0
INTL_IDNA_VARIANT_UTS46
1
IDNA_ERROR_EMPTY_LABEL
1
IDNA_ERROR_LABEL_TOO_LONG
2
IDNA_ERROR_DOMAIN_NAME_TOO_LONG
4
IDNA_ERROR_LEADING_HYPHEN
8
IDNA_ERROR_TRAILING_HYPHEN
16
IDNA_ERROR_HYPHEN_3_4
32
IDNA_ERROR_LEADING_COMBINING_MARK
64
IDNA_ERROR_DISALLOWED
128
IDNA_ERROR_PUNYCODE
256
IDNA_ERROR_LABEL_HAS_DOT
512
IDNA_ERROR_INVALID_ACE_LABEL
1024
IDNA_ERROR_BIDI
2048
IDNA_ERROR_CONTEXTJ
4096