聯(lián)系官方銷售客服
1835022288
028-61286886
使用{list action=sql sql='select * from @#1_news where abc!="" order by hits desc limit 6'} 會出現(xiàn)如上圖所示的錯誤 在 diy/dayrui/libraries/Template.php 中第 453 行中有判斷 是否兼容 5.5 版本 if (version_compare(PHP_VERSION, '5.5.0') >= 0) { $view_content = preg_replace_callback("/_get_var\('(.*)'\)/Ui", 'php55_replace_cache_array', $view_content); $view_content = preg_replace_callback("/list_tag\(\"(.*)\"\)/Ui", 'php55_replace_array', $view_content); } else { $view_content = preg_replace("/_get_var\('(.*)'\)/Uie", "\$this->_replace_cache_array('\\1')", $view_content); $view_content = preg_replace("/list_tag\(\"(.*)\"\)/Uie", "\$this->_replace_array('\\1')", $view_content); } 以及 2557行中過濾函數(shù) // 替換cache標簽中的單引號數(shù)組 for php5.5 function php55_replace_cache_array($string) { return "_get_var('".preg_replace('#\[\'(\w+)\'\]#Ui', '.\\1', $string[1])."')"; } // 替換list標簽中的單引號數(shù)組 function php55_replace_array($string) { return "list_tag(\"".preg_replace('#\[\'(\w+)\'\]#Ui', '[\\1]', $string[1])."\")"; }
你list出現(xiàn)引號了,不能有雙引號