码迷,mamicode.com
首页 > 其他好文 > 详细

CI练手下,找找感觉

时间:2014-11-11 18:33:53      阅读:239      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   color   ar   sp   div   on   

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

controller:

<?php
class 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>

bubuko.com,布布扣

CI练手下,找找感觉

标签:style   blog   http   io   color   ar   sp   div   on   

原文地址:http://www.cnblogs.com/aguncn/p/4089908.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!