$goods_body=htmlspecialchars_decode($goods_info['goods_body']);
if(preg_match_all("/<\s*img\s+[^>]*?src\s*=\s*(\'|\")(.*?)\\1[^>]*?\/?\s*>/i",$goods_body,$matches)){
foreach($matches[2] as $match){
@file_put_contents($image_path_2 . DIRECTORY_SEPARATOR . basename($match), file_get_contents($match));
}
}
$zip = new \ZipArchive();
if ($zip->open($exportPath . '.zip', \ZIPARCHIVE::OVERWRITE | \ZIPARCHIVE::CREATE) !== TRUE) {
$this->error(lang('zip_create_fail'));
}
$this->createZip(opendir($exportPath), $zip, $exportPath);
$zip->close();
//删除
$this->deldir($exportPath);
}
goods_id | 102 |
USER | www |
HOME | /home/www |
HTTP_REFERER | https://dsmall.csdeshang.com/home/TaobaoExport/export_image.html?goods_id=102 |
HTTP_USER_AGENT | claudebot |
HTTP_ACCEPT | */* |
HTTP_HOST | uniapp.api.dsmall.csdeshang.com |
PATH_INFO | |
REDIRECT_STATUS | 200 |
SERVER_NAME | uniapp.api.dsmall.csdeshang.com |
SERVER_PORT | 443 |
SERVER_ADDR | 211.149.201.16 |
REMOTE_PORT | 33718 |
REMOTE_ADDR | 54.196.248.93 |
SERVER_SOFTWARE | nginx/1.16.1 |
GATEWAY_INTERFACE | CGI/1.1 |
HTTPS | on |
REQUEST_SCHEME | https |
SERVER_PROTOCOL | HTTP/2.0 |
DOCUMENT_ROOT | /www/wwwroot/uniapp.api.dsmall.csdeshang.com/public |
DOCUMENT_URI | /index.php |
REQUEST_URI | //home/TaobaoExport/export_image.html?goods_id=102 |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/home/TaobaoExport/export_image.html&goods_id=102 |
SCRIPT_FILENAME | /www/wwwroot/uniapp.api.dsmall.csdeshang.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711906.1538 |
REQUEST_TIME | 1711711906 |