我有.Dat
文件,其中包含以下记录
A079862464FEY201703210000257420170321005931902017.
谁能告诉我如何在php中阅读此文件?我能够读取.txt文件,但我无法准备好.dat文件。
我试过了:
$myfile = fopen($file, "r") or die("Unable to open file!");
$tcheckData= fread($myfile,filesize($file));
$tcheckEndOfFileArray = explode('||',preg_replace( "/\r|\n/", "||", $tcheckData));
print_r($tcheckEndOfFileArray);
但是我收到了内部服务器错误505.我试过了
if(isset($_REQUEST["options"]) && $_REQUEST["options"]!="") {
$content = file_get_contents($_FILES["exampleInputFile"]["name"]);
print_r($content);
}
但是这也给出了内部服务器错误。