<?php
/**
* @Author: Marte
* @Date: 2018-03-06 20:14:08
* @Last Modified by: Marte
* @Last Modified time: 2018-03-06 20:27:55
*/
$file_path="test.txt";
// if(file_exists($file_path)){
// $fp=fopen($file_path,"a+");
// $con="\r\nhow are you?";
// fwrite($fp,$con);
// echo "ok to write in";
// }else{
// echo "file did't exists";
// }
// fclose($fp);
$con="\r\nwelcom come to shanghai NEXT TO TEXT";
file_put_contents($file_path, $con,FILE_APPEND);
echo "ok to write";
?>
文章来源:
北大青鸟开发小组