About uploading CSV files in PHP .... If there are more than 13 records, the system will fail to resolve them. an error will be reported directly in blank spaces. is it an environment configuration problem or something? ask for help .. Error & lt ;? Php & nbsp; exit ;? & Gt; 01-02 & nbsp; 10:49:16 & nbsp; | & nbsp; 2 & nbsp; | & nbsp; fopen () & nbsp; [& lt; a & nbsp; h. about uploading CSV files in PHP ....
If there are more than 13 records, the system will fail to resolve them. an error will be reported directly in blank spaces. is it an environment configuration problem or something? ask for help ..
Error
01-02 10:49:16 | 2 | fopen() [function.fopen]: Filename cannot be empty |
01-02 10:49:16 | 2 | fgetcsv() expects parameter 1 to be resource, boolean given |
01-02 10:49:16 | 2 | fclose() expects parameter 1 to be resource, boolean given |
$file=$_FILES["file"];
$file_type = substr(strstr($file['name'],'.'),1);
setlocale(LC_ALL, 'zh_CN');
$row=1;
$handle = fopen($file['tmp_name'],"r");
while ($data = fgetcsv($handle,1000,',')){
print_r($data);
$row++;
}
Share: More