Home > Article > Backend Development > 为什么小弟我的网页会很慢
为什么我的网页会很慢?
先看代码吧
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->class Admin_Controller extends CI_Controller { public function __construct() { parent::__construct(); $this->_init_user(); } //初始化用户 private function _init_user() { if(!empty($_SESSION['name'])) { redirect('management'); } else { redirect('login'); } }
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->class Management extends Admin_Controller { public function index() { $this->load->view('management'); }
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->class Login extends Admin_Controller { public function index() { $this->load->view('login'); } public function logins() { if($_POST['name'] == "admin" && $_POST['passwd'] == "123456") { $_SESSION['name'] = $_POST['name']; redirect('management'); } else { redirect('login'); } }}