<body>
<header>
<% include templates/header.ejs %>
</header>
<% include templates/announcement.ejs %>
<form>
<br><input type="text" id="myInput" onkeyup="myFunction()" placeholder="Search a fort...">
</form><br>
<section id="placeList">
<div class="placeListBackground" id="placeListGet">
<ul id="placeCells">
<% placeData.forEach(function(placeData) { %>
<div class="placeContainer <%= placeData.category %>" class><a href = "https://www.roblox.com/games/<%= placeData.placeid %>/-"><img src= "<%= placeData.placeicon %>" alt="<%= placeData.placename %>" align="left" width="178" height="100"><span><%= placeData.placename %></span><p><%= placeData.clan %></p><p>Playing: <%= placeData.playing %></p><p class="sCategory"><%= placeData.category %></p></a></div>
<% }); %>
</ul>
</div>
</section>
<br><footer>Contact us: https://discord.gg/fMb5y7T</footer>
</body>
<% include templates/search.ejs %>
我已经检查并测试了许多不同的ejs标签,以防万一,但是我不明白为什么这不起作用。以前可以使用,但是除非ejs的错误,否则我一定会忽略一些问题?
答案 0 :(得分:0)
我认为问题出在ejs标签上。
您写了:
<% include templates/file.ejs %>
并且应该是:
<%- include ("templates/file.ejs") %>
至少我有同样的问题,并以这种方式解决了,我希望是有用的。 寻找有关ejs更改的更多信息: https://github.com/RyanZim/EJS-Lint