首頁  >  文章  >  後端開發  >  smarty為什麼報這個錯? css中的錯誤也關模板引擎的事嗎?

smarty為什麼報這個錯? css中的錯誤也關模板引擎的事嗎?

WBOY
WBOY原創
2016-09-05 08:59:541373瀏覽

<code>
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:F:\phpstudy\WWW\smartys\smarty\templates\intro.html" on line 12 "*{margin:0;padding:0;border:0;}" - Unexpected ":", expected one of: "}" <-- thrown in F:\phpstudy\WWW\smartys\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 12</code>

原來是因為smarty語法與css語法衝突,都有大括號,把css放到外部文件就好了

回覆內容:

<code>
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:F:\phpstudy\WWW\smartys\smarty\templates\intro.html" on line 12 "*{margin:0;padding:0;border:0;}" - Unexpected ":", expected one of: "}" <-- thrown in F:\phpstudy\WWW\smartys\smarty\libs\sysplugins\smarty_internal_templatecompilerbase.php on line 12</code>

原來是因為smarty語法與css語法衝突,都有大括號,把css放到外部文件就好了

這應該是符號問題,你看是不是有符號缺失或中文狀態的符號

陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn