老子

老子

刘培育

  • 财富值165
  • 威望值0
  • 总积分195

个人信息

  • 一起学习学习!

  • 遇见同样的问题了
    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\framework\validators\CCaptchaValidator.php
    修改:
    方法 public function clientValidateAttribute($object,$attribute)
    中的(该文件第97行把false改为true)$code=$captcha->getVerifyCode(false);修改为 $code=$captcha->getVerifyCode(true);

助理 等级规则
195/200
资料完整度
50/100
用户活跃度
0/100

Ta的关注

0

Ta的粉丝

1

Ta的访客

5