1. % YiiRoot/framework/yiic webapp WebRoot/testdrive
2.默认Yii框架的URL规则是 http://hostname/index.php?r=controllerName/actionName&id=1
3. $this->render('index',array('a'=>"123"));
4. $hostname=Yii::app()->request->userHost;
$status=$_REQUEST['status'];
5.
'request'=>array(
'class'=>'CHttpRequest',
),
$host=Yii::app()->request->hostInfo;
$this->render('index',array('a'=>"123",'b'=>$host));
6.
$name=$_POST["name"];
$pass=$_POST["pass"];
$this->render('result',array('a'=>$name,'b'=>$pass));
7.改变显示模板 $this->layout = 'admin';
8.php yiic shell config/main.php
9.model Aadmins
crud Department
10. $model=Aadmins::model()->find();
print_r($model);
11.<form action="/yemmys/yemmys/index.php?r=site/login" method="post">
12.<input name="LoginForm[username]" =>$data->id))',
//'vaule'=>'Yii::app()->user->name',
),
相关文章: