18 lines
		
	
	
		
			439 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			439 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
function removeUtf8Bom($text) {
 | 
						|
    $bom = pack('H*', 'EFBBBF');
 | 
						|
    if (0 === strpos($text, $bom)) {
 | 
						|
        $text = substr($text, 3);
 | 
						|
    }
 | 
						|
    return $text;
 | 
						|
}
 | 
						|
 | 
						|
//function removeUtf8Bom($text) {
 | 
						|
//    return mb_convert_encoding($text, 'UTF-8', 'UTF-8');
 | 
						|
//}
 | 
						|
 | 
						|
 | 
						|
$content = file_get_contents('C:\Users\jiaoyukun\Desktop\orders.csv');
 | 
						|
var_dump($content);
 | 
						|
//保存到本地
 | 
						|
$file = fopen('C:\Users\jiaoyukun\Desktop\orders_2.csv', 'w'); |