没有下载书签组件,改写下
public function saveTags(){
$ids=[];
if (!empty($this->tags)){
$tags=explode(' ',$this->tags);
foreach ($tags as $tag) {
$ids[]=$this->_saveTag($tag);
}
}
return $ids;
}
public function saveTags(){
$ids=[];
if (!empty($this->tags)){
$tags=explode(' ',$this->tags);
foreach ($tags as $tag) {
$ids[]=$this->_saveTag($tag);
}
}
return $ids;
}
2017-02-26
最赞回答 / 明天4034464
<?phpnamespace frontend\models;use Yii;use yii\base\Model;use common\models\PostsModel;use yii\base\Object;//文章表单模型class PostForm extends Model{ public $id; public $title; public $content; public $label_img; public $cat_id; public $tags; public $_lastE...
2017-02-25
最赞回答 / alds
上传图片显示上传错误,按下面的方式处理应该可以解决问题:在common/widgets/ueditor/Uploader.php文件的getFullName()函数中,修改$randNum这一行为$randNum=rand(1, 9999) . rand(1, 999);
2017-02-24
404的朋友,web 下新建.htaccess 文件
# use mod_rewrite for pretty URL support
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
# use mod_rewrite for pretty URL support
RewriteEngine on
# if a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward the request to index.php
RewriteRule . index.php
2017-02-23
说的不错,如果使用的是代码编辑器在四分钟的时候在site里面继承Base的控制器的时候需要在site文件中添加一句
use frontend\controllers\base\BaseController;
谢谢一楼提醒。
use frontend\controllers\base\BaseController;
谢谢一楼提醒。
2017-02-21