PHP development of simple book background management system content page
This page combines the previous left page and right page through code integration into a complete file named ly_center.php
The left page in the previous chapter is named ly_left.php file
The name of the right page is the ly_right.php file
ly_center.php file code:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>PHP图书管理系统内容页</title> <style type="text/css"> <!-- body { overflow:hidden; } --> </style> </head> <body> <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="8" bgcolor="#353c44"> </td> <td width="147" valign="top"> <iframe height="100%" width="100%" border="0" frameborder="0" src="ly_left.php" name="leftFrame" id="leftFrame" title="leftFrame"> </iframe> </td> <td width="10" bgcolor="#add2da"> </td> <td valign="top"> <iframe height="100%" width="100%" border="0" frameborder="0" src="ly_right.php" name="rightFrame" id="rightFrame" title="rightFrame"> </iframe> </td> <td width="8" bgcolor="#353c44"> </td> </tr> </table> </body> </html>
Using the <iframe> tag, the iframe element will create an inline frame that contains another document ( i.e. inline frames).
Connect several different pages through <iframe> and display them on the same page.
We set up the top page earlier and named it ly_top.php.
Introduce the ly_top.php file and ly_center.php by using include_once in the HTML code document.
is combined into the main management page that will jump after logging in.
The management center page is named: admin_index.php file.
<!DOCTYPE html> <html> <head> <title>管理中心</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> </head> <body style="margin: 0; padding: 0;"> <div> <?php include_once("ly_top.php");?> </div> <div style="height: 500px;"> <?php include_once("ly_center.php");?> </div> </body> </html>
include_once statement includes and runs the specified file during script execution. This behavior is similar to the include statement, the only difference is that if the file has already been included, it will not be included again. As the name of this statement implies, it will only be included once.