"" . " "; //taoschema扩展字段
$str = iconv("UTF-8", "UTF-16LE", $str);
$str = "\xFF\xFE" . $str; //添加BOM
file_put_contents($exportPath . DIRECTORY_SEPARATOR . 'goods_' . $goods_info['goods_id'] . '.csv', $str);
$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 | 27 |
USER | www |
HOME | /home/www |
HTTP_REFERER | https://dsmall.csdeshang.com/home/TaobaoExport/export_csv.html?goods_id=27 |
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 | 41792 |
REMOTE_ADDR | 54.160.245.243 |
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_csv.html?goods_id=27 |
SCRIPT_NAME | /index.php |
CONTENT_LENGTH | |
CONTENT_TYPE | |
REQUEST_METHOD | GET |
QUERY_STRING | s=/home/TaobaoExport/export_csv.html&goods_id=27 |
SCRIPT_FILENAME | /www/wwwroot/uniapp.api.dsmall.csdeshang.com/public/index.php |
FCGI_ROLE | RESPONDER |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711718125.0305 |
REQUEST_TIME | 1711718125 |