Skip to content

Commit

Permalink
移除目录依赖
Browse files Browse the repository at this point in the history
  • Loading branch information
evalor committed Aug 19, 2018
1 parent 5442f02 commit a43e1e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Conf.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Conf extends SplBean
public $fontSize = 25; // 字体大小
public $length = 4; // 生成位数
public $mime = MIME::PNG; // 设置类型
public $temp = EASYSWOOLE_ROOT . '/Temp/Captcha/'; // 设置缓存目录
public $temp = '/tmp'; // 设置缓存目录

public function setTemp($temp){
if (!is_dir($temp)) mkdir($temp,0755) && chmod($temp,0755);
Expand Down
2 changes: 2 additions & 0 deletions src/VerifyCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ function DrawCode($Code = null)
$Code = substr(str_shuffle($this->charset), 0, $this->length);
}

$Code = strval($Code);

// 创建空白画布
$this->imInstance = imagecreate($this->imageL, $this->imageH);
// 设置背景颜色
Expand Down

0 comments on commit a43e1e6

Please sign in to comment.