Directory structure:
RegSystem/index.php
<?php /** * Created by PhpStorm. * User: root * Date: 16-4-9 * Time: 下午11:21 * * 项目前台入口文件 */ //网站单入口文件,单入口有很多好处 //处理URL参数 $module = isset($_GET['module'])?$_GET['module']:'index'; $host = $_SERVER['HTTP_HOST']; if($module == 'admin'){ //跳转进入后台登录 header('Location: ' .'http://'.$host.'/RegSystem/Admin/index.php'); }
The above introduces the PHP training: the competition registration system implements a simple single entry, including the registration system and PHP content. I hope it will be helpful to friends who are interested in PHP tutorials.