Commit b2be8fa4 by HanSon Committed by GitHub

修复路径不存在时自动创建文件夹 (#4)

* 删除依赖包

* 更新依赖包

* 删除多余

* 修复路径不存在时自动创建文件夹
1 parent 73359cc1
...@@ -137,6 +137,10 @@ class Server ...@@ -137,6 +137,10 @@ class Server
$qrCode = new QrCode($url); $qrCode = new QrCode($url);
if(!is_dir(realpath($this->config['tmp']))){
mkdir($this->config['tmp'], 0700, true);
}
$file = $this->config['tmp'] . 'qr.png'; $file = $this->config['tmp'] . 'qr.png';
$qrCode->save($file); $qrCode->save($file);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!