【发布时间】:2020-01-09 15:51:55
【问题描述】:
我在代码中的某处使用<% include components/aside.ejs %> 或<% include components/head.ejs %> 没有任何问题。但是当我在这样的 for 循环中使用 include 时
<%
for (var i = 0; i < 20; i++) {
include components/head.ejs;
}
%>
,我得到Unexpected identifier in [file path] while compiling ejs。
是否有任何我没有注意到的明显错误?
【问题讨论】: