php读文件代码片段
function readFromFile($fileName,&$arrOutPut){
$handle = @fopen($fileName, "r");
if ($handle) {
while (!feof($handle)) {
$buffer = fgets($handle, 4096);
$arrOutPut[] = $buffer ;
}
fclose($handle);
}
}
readFromFile("./xxx.list",$arrData);
如果想和我我交流技术方向的心得及感受,可以扫码关注我的公众号,上面我绑定了微信号。
浙公网安备 33010602011771号