时间:2021-07-01 10:21:17 帮助过:6人阅读
$file_path = "test.txt";
if (file_exists($file_path))
{
$fp=fopen($file_path, "a+");
$con=fread($fp, filesize($file_path));
echo $con;
}else
{
echo "文件不存在";
}
fclose($fp);
?>
$file_path = "test.txt";
$con=file_get_contents($file_path);
$con=str_replace("\r\n","
",$con);
echo $con;
?>