src/Upload.php
public function upload()
    {

        if ($this->path == '') {
            $this->error = '请设置保存路径';
            return;
        }

        if (is_array($this->file)) {
            foreach ($this->file as $file) {
                $rest = $this->save($file, $this->path);
                for ($i = 0, $n = count($this->file); $i < $n; $i++) {
                    if ($rest) {
                        $this->file[$i]['url'] = 'http://' . $_SERVER['HTTP_HOST'] . $this->path . '/' . $this->file[$i]['filename'];
                    } else { $this->file[$i]['url'] = '';}
                }
            }
            return $rest;
        }
    }
public function upload()
    {

        if ($this->path == '') {
            $this->error = '请设置保存路径';
            return;
        }

        if (is_array($this->file)) {
            foreach ($this->file as $file) {
                $rest = $this->save($file, $this->path);
                for ($i = 0, $n = count($this->file); $i < $n; $i++) {
                    if ($rest) {
                        $this->file[$i]['url'] = 'http://' . $_SERVER['HTTP_HOST'] . $this->path . '/' . $this->file[$i]['filename'];
                    } else { $this->file[$i]['url'] = '';}
                }
            }
            return $rest;
        }
    }
/*执行