diff --git a/library/think/cache/driver/Lite.php b/library/think/cache/driver/Lite.php index 551359f7..0a3a838b 100644 --- a/library/think/cache/driver/Lite.php +++ b/library/think/cache/driver/Lite.php @@ -36,8 +36,8 @@ class Lite if (!empty($options)) { $this->options = array_merge($this->options, $options); } - if (substr($this->options['path'], -1) != '/') { - $this->options['path'] .= '/'; + if (substr($this->options['path'], -1) != DS) { + $this->options['path'] .= DS; } } diff --git a/library/think/db/builder/Mysql.php b/library/think/db/builder/Mysql.php index d7427af7..84853307 100644 --- a/library/think/db/builder/Mysql.php +++ b/library/think/db/builder/Mysql.php @@ -31,7 +31,7 @@ class Mysql extends Builder $key = trim($key); if (strpos($key, '$.') && false === strpos($key, '(')) { // JSON字段支持 - list($field, $name) = explode($key, '$.'); + list($field, $name) = explode('$.', $key); $key = 'jsn_extract(' . $field . ', \'$.\'.' . $name . ')'; } if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) {