Commit f470b80f by HanSon

修复路径不存在时自动创建文件夹

1 parent 24ebcff0
...@@ -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!