作者 lyh

gx

@@ -222,7 +222,7 @@ class FileController @@ -222,7 +222,7 @@ class FileController
222 */ 222 */
223 public function downLoad(){ 223 public function downLoad(){
224 $file_model = new File(); 224 $file_model = new File();
225 - $info = $file_model->read(['path' => '/'.str_replace_url($this->param['path'])]); 225 + $info = $file_model->read(['path' => str_replace_url($this->param['path'])]);
226 if ($info === false) { 226 if ($info === false) {
227 $this->response('指定文件不存在!', Code::USER_ERROR); 227 $this->response('指定文件不存在!', Code::USER_ERROR);
228 } 228 }
@@ -292,7 +292,7 @@ class ImageController extends Controller @@ -292,7 +292,7 @@ class ImageController extends Controller
292 public function download(){ 292 public function download(){
293 $imageModel = new ImageModel(); 293 $imageModel = new ImageModel();
294 ; 294 ;
295 - $info = $imageModel->read(['path' => '/'.str_replace_url($this->param['path'])]); 295 + $info = $imageModel->read(['path' => str_replace_url($this->param['path'])]);
296 if ($info === false) { 296 if ($info === false) {
297 $this->response('指定文件不存在!', Code::USER_ERROR); 297 $this->response('指定文件不存在!', Code::USER_ERROR);
298 } 298 }