/**
* PHP修改服务器上的文件代码
*
* @param
* @arrange 512-笔记网: jb51.cc
**/
<?PHP
$fh = fopen("testfile.txt",'r+') or die("Failed to open file");
$text = fgets($fh);
fseek($fh,SEEK_END);
fwrite($fh,"$text") or die("Could not write to file");
fclose($fh);
echo "File 'testfile.txt' successfully updated";
/*** 来自编程之家 jb51.cc(jb51.cc) ***/