Steps to obtain dynamic code for Empire CMS custom page: Create a custom page and switch to HTML editing mode. Copy and paste the code, replacing the table name and sort field. Save the page and get the page address. Call the code at the desired location: .
How to set up dynamic code for Empire CMS custom page
Step 1: Create a custom page
Step 2: Set up dynamic code
<code class="html"><?php $sql = "SELECT * FROM `表名` ORDER BY `排序字段` ASC"; $rs = $empire->query($sql); while($r = $empire->fetch($rs)) { ?> <!-- 输出动态内容 --> <p>标题:<?php echo $r['title']; ?></p> <p>内容:<?php echo $r['content']; ?></p> <?php } ?> </code>
Step 3: Save the page
Step 4: Get the page address
Step 5: Call the custom page
<code class="html"><iframe src="自定义页面地址" width="100%" height="1000"></iframe></code>
The above is the detailed content of How to set up the dynamic code for custom pages in Empire CMS. For more information, please follow other related articles on the PHP Chinese website!