我对这段代码有一个奇怪的行为
foreach ($files as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$name = $_FILES["excelFiles"]["name"][$key];
$handle = fopen($_FILES["excelFiles"]["tmp_name"][$key], "r");
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
print_r($data);
echo "\r\n";
}
fclose($handle);
}}
问题是带有撇号的希伯来语字符串被剪掉(只是消失在稀薄的空气中)
这是一行结果,例如:
Array
(
[0] => '
[1] => אני לא רעבה, תודה
)