Commit a5450c13150f2c6dbcc6536063ee2bc2b539cfd6

Authored by u123231312
1 parent f9e1cedc

no message

... ... @@ -15,7 +15,10 @@ class Template extends Common{
}
public function index(){
//$path = $this->publicpath.'images/'.input('folder').'/'; ///Applications/XAMPP/xamppfiles/htdocs/dashboard/images/
//$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/";
... ... @@ -64,8 +67,9 @@ class Template extends Common{
//新建zip压缩包
$obj = $zip->open($filename,\ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE);
$newfile = trim(strrchr($file, '/'),'/');
//把图片一张一张加进去压缩
$zip->addFile($file);
$zip->addFile($file,'/download/'.$newfile);
//打包zip
$rs = $zip->close();
}else{
... ... @@ -78,7 +82,8 @@ class Template extends Common{
//把图片一张一张加进去压缩
$files = glob($file.'/*');
foreach($files as $key=>$val){
$zip->addFile($val);
$newfile = trim(strrchr($val, '/'),'/');
$zip->addFile($val,'/download/'.$newfile);
}
//打包zip
... ...
... ... @@ -47,7 +47,7 @@
{if condition="!empty($vo['ico'])"}
<img src="/static/home/images/ext/{$vo['ext']}.png">
{else /}
<img src="/static/home/images/{:input('folder')}{$vo.filename}" >
<img src="https://xt04.colorcun.com/tables/batchPicsyn/{:input('folder')}{$vo.filename}" >
{/if}
</a>
</span>
... ...