|
...
|
...
|
@@ -16,11 +16,11 @@ class Template extends Common{ |
|
|
|
|
|
|
|
public function index(){
|
|
|
|
//$path = $this->publicpath.'images/'.input('folder').'/';
|
|
|
|
//
|
|
|
|
//测试环境 /Applications/XAMPP/xamppfiles/htdocs/dashboard/images/
|
|
|
|
//线上环境 /alidata/www/dc-api/public/tables/batchPicsyn/
|
|
|
|
|
|
|
|
$path = "/alidata/www/dc-api/public/tables/batchPicsyn/";
|
|
|
|
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
|
|
|
|
$path = "/Applications/XAMPP/xamppfiles/htdocs/dashboard/images/";
|
|
|
|
else
|
|
|
|
$path = "/alidata/www/dc-api/public/tables/batchPicsyn/";
|
|
|
|
|
|
|
|
$uppath = explode('/',input('folder'));
|
|
|
|
$leve = count($uppath)-1;
|
|
...
|
...
|
@@ -56,7 +56,12 @@ class Template extends Common{ |
|
|
|
}
|
|
|
|
|
|
|
|
public function PackzipDownload(){
|
|
|
|
$path = "/alidata/www/dc-api/public/tables/batchPicsyn/";
|
|
|
|
|
|
|
|
if($_SERVER['REMOTE_ADDR']=="127.0.0.1")
|
|
|
|
$path = "/Applications/XAMPP/xamppfiles/htdocs/dashboard/images/";
|
|
|
|
else
|
|
|
|
$path = "/alidata/www/dc-api/public/tables/batchPicsyn/";
|
|
|
|
|
|
|
|
$file=$path.input('post.filename');
|
|
|
|
//首先判断是图片还是路径
|
|
|
|
if($this->isImage($file)!==false){
|
...
|
...
|
|