我有一些PHP代码,将显示用户点击的3个不同选项的收藏夹。 我需要在我的html应用程序网站的单个页面中显示这个,我想知道如何做到这一点? 大概将它插入顶部是不行的,我不能将它插入div中? 我需要一些jquery吗?如何以及我需要做什么?
<div data-role="page" id="page3" class="ui-content" >
<div data-role="header" data-theme="a" class="ui-header">
<a href="#" class="ui-btn" data-rel="back">Go Back</a>
<h1><img src="logo.png" alt="logo" /></h1>
<h1>Page Three</h1>
</div>
<div data-role="content">
this is where i want the script
</div>
<div data-role="footer">
<h4>All Rights Reserved ICook 2015</h4>
</div>
</div>
答案 0 :(得分:1)
只要扩展名为.php并且PHP保存在适当的标记内,就可以在同一页面上混合使用PHP和HTML。
例如:
<p>The current amount of users is <?php echo 50; ?></p>
或者,如果要包含现有PHP文件,请执行以下操作:
<?php
include "some_file.php";
?>