关于基本的文件读写内容:
<?php echo "readfile function:<br>"; readfile("tm.txt"); echo "<br>"; echo "file function:<br>"; $f_arr = file("tm.txt"); foreach ($f_arr as $cont) { echo $cont."<br>"; } echo "file_get_contents function:<br>"; $f_chr = file_get_contents(‘tm.txt‘); echo $f_chr; ?>
时间: 2024-11-13 06:58:54