CI练手下,找找感觉

从军哥谈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>

CI练手下,找找感觉

上一篇:/dev/random vs /dev/urandom


下一篇:/dev/random 和 /dev/urandom 的原理