Commit ed45cca5 by 冷斌

fix bug

parent b70c460d
...@@ -47,7 +47,7 @@ class AuthController extends HomebaseController { ...@@ -47,7 +47,7 @@ class AuthController extends HomebaseController {
$saveName=I('saveName'); $saveName=I('saveName');
$config=array( $config=array(
'replace' => true, 'replace' => true,
'rootPath' => '/', 'rootPath' => './'.C("UPLOADPATH"),
'savePath' => 'rz/', 'savePath' => 'rz/',
'maxSize' => 0,//500K 'maxSize' => 0,//500K
'saveName' => array('uniqid',''), 'saveName' => array('uniqid',''),
......
...@@ -128,15 +128,21 @@ class Upload { ...@@ -128,15 +128,21 @@ class Upload {
/* 检测上传根目录 */ /* 检测上传根目录 */
if(!$this->uploader->checkRootPath($this->rootPath)){ if(!$this->uploader->checkRootPath($this->rootPath)){
$this->error = $this->uploader->getError(); $this->error = $this->uploader->getError();
var_dump(1, $this->error);
die;
return false; return false;
} }
/* 检查上传目录 */ /* 检查上传目录 */
if(!$this->uploader->checkSavePath($this->savePath)){ if(!$this->uploader->checkSavePath($this->savePath)){
$this->error = $this->uploader->getError(); $this->error = $this->uploader->getError();
var_dump(2, $this->error);
die;
return false; return false;
} }
var_dump(3);
die;
/* 逐个检测并上传文件 */ /* 逐个检测并上传文件 */
$info = array(); $info = array();
if(function_exists('finfo_open')){ if(function_exists('finfo_open')){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment