最近遇到一个禾匠的问题,版本不清楚,应该是微擎版本的,导出的时候订单的总金额和实际支付金额一致,所以特此记录方便大家以后修改的时候~
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/8/21
* Time: 14:55
*/
namespace app\modules\mch\extensions;
use app\models\OrderForm;
use app\models\Shop;
use app\models\User;
class Export
{
//导出 header
public static function exportHeader($EXCEL_OUT)
{
header("Content-type:text/csv");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
echo $EXCEL_OUT;
}
//判断是否含有英文逗号,英文引号
public static function Check($str)
{
$str = str_replace(array("\r\n", "\r", "\n"), "", $str);
if (strpos($str, ',')) {
if (strpos($str, "\"") || strpos($str, "\"") == 0
|