其他分享
首页 > 其他分享> > swoft读取TXT

swoft读取TXT

作者:互联网

单列TXT

    $file = $request->file('courseware');
    $path = $file->getFile();
    $fileArr = file($path);
    foreach($fileArr as $v){
        $a = trim($v);
        $a = str_replace("\r\n","",$a);
        $a = str_replace("\r","",$a);
        $a = str_replace("\n","",$a);
        $data[] = $a;
    }

多列TXT

标签:file,读取,swoft,replace,fileArr,str,path,TXT
来源: https://www.cnblogs.com/pee2bee/p/15881850.html