CI练手下,找找感觉

时间:2022-12-01 05:03:46

从军哥谈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练手下,找找感觉