搜尋

首頁  >  問答  >  主體

java - 七牛 取指定的空间下面的文件条目,报错

发现部分空间是可以
部分空间不可以,报下面的错误
{ResponseInfo:com.qiniu.http.Response@74d25d10,status:631, reqId:OUgAAEnJhJQ3MY4U, xlog:CFGG:3/612;ZONEPROXY:12/631, xvia:, adress:rsf.qbox.me/183.136.139.24:80, duration:0.000000 s, error:no such bucket}

PHPzPHPz2884 天前1188

全部回覆(1)我來回復

  • 梦想无需昭告天下

    梦想无需昭告天下2017-09-26 23:14:44

    /**

    * 驗證碼類

    */

    $code= new Code();

    $code->outImage();

    class Codeted

    {

    tected

    受保護的$codeType;

    受保護的$width;

    受保護的$height;

    受保護的$image;

    受保護的$code;

    公用函數__construct($number=4,$codeType=2,$width= 100,$height=30)

    {

    $this->number=$number;

    $this->codeType=$codeType;

    $this->width=$width;

    $this ->height=$height;

    $this->code=$this->createCode();

    }

    公用函數

    公用函數){

    if ($name=='code' ) {

    return $this->code;

    }else{

    return false;

    imagedestroy($ this->image);

    }

    protected function createCode(){

    switch ($this->codeType) {

    case '0':switch ($this->codeType) {

    cget) ;

    case '1':

    $code=$this->getCharCode();

    break;

    case '2':

    $code=$

    case '2':

    $ ;

    預設值:

    die("對不起,不支援該驗證碼型別!!!");

    }

    return $code;

    }

    tec

    return $code;

    }

    ) join ('',range (0, 9));

    return substr(str_shuffle($str), 0,$this->number);

    }

    protected function getCharCode(){

    }

    protected function getCharCode(){

    }

    protected ( '',range (a, z));

    $str=$str.strtoupper($str);

    return substr(str_shuffle($str), 0,$this->number);

    }

    protected function getNumberCharCode (){

    $str1=join('',range(0, 9));

    $str=join('',range(a, z));

    $strstr=$str=join('',range(a, z));

    $str=$str1 . $str。 strtoupper($str);

    return substr(str_shuffle($str);

    return substr(str_shuffle($str), 0,$this->number);

    }

    public function outImage(){

    $this->createIunction; this->fillBack();

    $this->drawChar();

    $this->drawDistrub();

    $this->show();

    }

    受保護函式

    $this->image=imagecreatetruecolor($this->width, $this->height);

    }

    protected function fillBack(){

    imagefill($this->, this > 0, $ $, this- > lightColor());

    }

    受保護函數lightColor(){

            return  imagecolorallocate($this->image, mt_rand(130,255), 155($

    }

    protected function darkColor(){

    return  imagecolorallocate($this->image, mt_rand(0,120), mt_rand(0,120), mt_rand(0,120));

    }

    }

    0; $i <$this->數字; $i++) { 

    $Width=$this->寬度/$this->數字;

    $x=mt_rand($i*$Width+10,($i+1)*$Width-15);

    $y=mt_rand(0,$this->height-18);

    imagechar( $ this->image, 6, $x, $y, $this->code[$i], $this->darkColor());

    }

    }

    受保護函數drawDistrub(){

    for

    for

    for ( $i=0; $i < 300; $i++) { 

    $x=mt_rand(0,$this->寬度);

    $y=mt_rand(0,$this->寬度);

    $ y =mt_rand(0,$this->寬度) height);

    imagesetpixel($this->image, $x, $y, $this->lightColor());

    }

    }

    show (){

    header("內容-類型:image/png");

    imagepng($this->image);

    }

    }🎜🎜?>🎜🎜 }🎜🎜

    回覆
    0
  • 取消回覆