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',
        ),

相关文章:

  • 2021-12-19
  • 2021-08-17
  • 2021-07-07
  • 2021-07-01
  • 2021-08-21
  • 2022-01-02
  • 2022-01-01
猜你喜欢
  • 2021-09-14
  • 2021-08-29
  • 2022-12-23
  • 2021-11-17
  • 2021-09-27
  • 2021-05-29
  • 2022-02-28
相关资源
相似解决方案