首页 > 代码库 > CI练手下,找找感觉

CI练手下,找找感觉

从军哥谈CI框架上看了点点。

controller:

<?phpclass Jayjun extends CI_Controller {        public function __construct()        {                parent::__construct();        }        public function index()        {                $data[‘title‘] = "a simple view";                $data[‘content‘] = array(                        "name" => "chengang",                        "age" => 25,                        );                $this->load->view("jayjun_view", $data);        }}?>
<html><head>        <title><?php echo $title;?></title><head><body><h1>Hello,my name is <?php echo $content[‘name‘];?>.WELCOME!</h1>now i am <?php echo $content[‘age‘];?> years old.</body><html>

CI练手下,找找感觉