What's important here is the idea that in a page, by clicking on a different link, the same area is displayed differently.
Method: In the div tag, depending on the click of the link when the different parameters, to load different pages
Example code explanation: to click upload Download file as an example
1. <div id= ' main ' >
<a href= "? act=" > Home </a>| | <a href= '? act=up ' > I want to upload </a>| | <a href= '? act=down ' > I want to download </a>
</div>
<div id= "Content" >
<?php
$act = $_get[' act '];
Switch ($act) {
Case ' up ':
Include ' upload.php ';
Break
Case ' upfile ';
Include ' upfile_chk.php ';
Break
Case ' down ';
Include ' downfile.php ';
Break
Case ' Downcode ';
Include ' downcode.php ';
Break
Case ' queryfile ';
Include ' queryfile.php ';
Break
Default
Include ' pub.php ';
Break
}
?>
</div>
The effect of the above code implementation is: When visiting the index.php, show the home page, I want to upload, I want to download the link, And below shows the content under the pub.php file (first visit is default), click I want to upload, in the following appear upload file domain, click I want to download, in the following display download navigation, click on the first page to display all the file list. A concrete example diagram:
Note: The above code functions can be normal implementation, if necessary, can leave a message request.