老子
- 老子 回复了话题 Yii的Ajax能完成“推荐”数加
一起学习学习!
- 老子 回复了话题 关于处理缩略图的拓展CThumb
遇见同样的问题了
YiiBase::include(CThumb.php) [yiibase.include]: failed to open stream: No such file or directory$imageName = $this->loadModel($id)->name; $path = Yii::app()->basePath.'/../images/goods/'.$imageName; //利用扩展生成缩略图 $im = null; //取图片类型 $imagetype = strtolower($this->getExt($imageName)); if($imagetype == 'gif') { $im = imagecreatefromgif($path); } else if($imagetype == 'jpg') { $im = imagecreatefromjpeg($path); }else if($imagetype == 'png') { $im = imagecreatefrompng($path); } //设定缩略图的存放目录+名字 $thumb_path=yii::app()->basePath.'\..\tmp\\thumb\\'.$imageName; //生成缩略图 CThumb::resizeImage($im, 100, 100, $thumb_path, $imagetype ); $this->render('view',array( 'model'=>$this->loadModel($id), ));
如此奈何?
- 老子 回复了话题 YII引用其他样式验证码
大哥有道理
- 老子 发布了话题YII引用其他样式验证码
- 老子 回复了话题 刷新页面时验证码没有刷新
找到文件:
yii\framework\validators\CCaptchaValidator.php
修改:
方法public function clientValidateAttribute($object,$attribute)
中的(该文件第97行把false改为true)$code=$captcha->getVerifyCode(false);
修改为$code=$captcha->getVerifyCode(true);