public function writefile($filename,$txt){ $myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/'.$filename, "a") or die("Unable to open file!"); fwrite($myfile, $txt); fclose($myfile); }
public function writefile($filename,$txt){ $myfile = fopen($_SERVER['DOCUMENT_ROOT'].'/'.$filename, "a") or die("Unable to open file!"); fwrite($myfile, $txt); fclose($myfile); }
$wlog = fopen(“__PUBLIC__/../log.txt”,’w’);
fwrite($wlog,$i);
这两行就行