0
我在我的smarty模板中有一个div,我想通过ajax调用一个PHP文件来获取/显示另一个模板文件。这将包含网站上的一个页面列表,这些页面将被排序,您可以点击向上/向下箭头对它们进行重新排序,因此我需要它在每次点击后重新加载相同的模板。在另一个模板中使用ajax调用/重新加载smarty模板
这可能吗?
<div id="pagelist_container"></div>
<script type="text/javascript">
{literal}
$(document).ready(function(){
$("#pagelist_container").load("path_to_file/pages.php");
});
{/literal}
</script>
然后pages.php是:
$smarty->display('ajax/pages.tpl');
每当我把智者行我得到一个500错误。
你能写出错误吗? – VMAtm