Undefined index:upload_ur 如果抛出这个错 直接在common/config/params.php加一个upload_url就行,值为空就可以
2018-05-01
const IS_VALID = '1';//默认是已经发布
const NO_VALID = '0';//未发布
该处必须是字符串类型的,或者在posts下面的rule对is_valid的验证去掉,不然会添加不上去
const NO_VALID = '0';//未发布
该处必须是字符串类型的,或者在posts下面的rule对is_valid的验证去掉,不然会添加不上去
2018-05-01
main.php中Breadcrumbs改'url' => Url::to(['site/index']),
2018-04-21
<p><a href="<?=Url::to('../post/create')?>" class="btn btn-success" style="width:100%;color:#fff;">创建文章</a></p>
<p><a href="<?=Url::to('../post/update')?>" class="btn btn-info" style="width:100%;color:#fff;">创建文章</a></p>
<p><a href="<?=Url::to('../post/update')?>" class="btn btn-info" style="width:100%;color:#fff;">创建文章</a></p>
2018-04-21
$postModel = new PostForm();
//文章统计
$postExtendsModel = new PostExtends();
$postExtendsModel -> upCounter(['post_id'=>$id], 'browser', 1);
$data = $postModel -> getViewById($id);
//文章统计
$postExtendsModel = new PostExtends();
$postExtendsModel -> upCounter(['post_id'=>$id], 'browser', 1);
$data = $postModel -> getViewById($id);
2018-04-21
<?=Url::to(['post/view','id'=>$list['id']])?>
2018-04-21
frontend\config\[arams.php添加'upload_url' => 'http://localhost/',然后调整样式
2018-04-21