
关于model数据保存[2.0]
比如说我有一个文章模型 title content auther 这三个字段是必填的 然后我还有一些其他的非必填字段 time isPublish 等等 我在\models\Post.php这个文件里面添加了规则 public functi...
比如说我有一个文章模型 title content auther 这三个字段是必填的 然后我还有一些其他的非必填字段 time isPublish 等等 我在\models\Post.php这个文件里面添加了规则 public functi...
第一步,配置config/main.php里面components的静态启用和路由规则启用 'urlManager' => [ 'enablePrettyUrl' => true, //启用路由 'enablePrettyUrl...
$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];获取不到微信服务器post给我的xml数据 在网上查了下另一种写法$postStr = file_get_contents('php://input');就...
frontend/modules/user/Module.php namespace frontend\modules\user; class Module extends \yii\base\Module { public $contro...
使用\Yii::$app->user->isGuest; 登陆前状态为1 登陆后 重新返回刷新登陆页面 就以下报错 没有user表,我数据库表是users。但是这个user是在哪里调用的?Database Exception –...
yii2 怎么设置网站logo 在/layouts/main.php中如下定义我的为什么不行啊,还是yii自带的logo已解决,谢谢
命名空间 比如yii2.0某个控制器里要调用系统自带的控制器 use yii/web/Controller 请问这个后半部分是路径吗? 但是我查了一下这个文件,它是在’XXX/yii2/web/controller’...
类似这样的 前台:http://www.demo.com/index.php 后台:http://www.demo.com/admin.php 我用的是该高级版,有front和backend两个模块,不会配置,求教! 你把www.demo...
我知道有一个属性可以设置行样式,但是这个属性代表了全部行的样式 ‘rowOptions’=>[‘class’=>’text-center’],//行样式 其...
求find() one() all()详细介绍 http://www.yiichina.com/doc/api/2.0/yii-db-queryhttp://www.yiichina.com/doc/api/2.0/yii-db-activ...