Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从 php,有什么方法可以检测 html 中是否有任何聪明的语法错误?
只需获取模板并捕获异常。
try { $template->fetch("test.tpl"); } catch (Exception $e) { }
你可以把它放在一个返回你需要的任何东西的函数中。