关于PHP上传CSV问题。。。。
超过13条就解析不了,直接空白报错,是环境配置问题还是什么,求助。。
报错
<?php exit;?>01-02 10:49:16 | 2 | fopen() [<a href='function.fopen'>function.fopen</a>]: Filename cannot be empty |
<?php exit;?>01-02 10:49:16 | 2 | fgetcsv() expects parameter 1 to be resource, boolean given |
<?php exit;?>01-02 10:49:16 | 2 | fclose() expects parameter 1 to be resource, boolean given |
<form name="myform" id="myform" action="index.php?m=price&c=index&a=insertalldo" method="post" enctype="multipart/form-data"><input name="pc_hash" type="hidden" value="4GxoOl"></form>
$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++;
}