php文本编辑器:php在线文本编辑器来源: 发布时间:星期四, 2009年2月12日 浏览:187次 评论:0
作者:leon0324 <? function write_file($filename,$contents) { ($fp=fopen($filename,\"w\")) { fwrite($fp,stripslashes($contents)); fclose($fp); 1 ; } { 0; } }; ($submitbutton\"完成\") { $rs=write_file(\"$page\",\"$test\"); echo \"<a href=\"$page\">$page</a> \"; } ($action\"page\") { $content=\"$page\"; $fp=fopen($content,\"r\") or die(\'Could not open file.\'); $contents=fread($fp,filesize($content)) or die(\'Could not read from file.\'); $contents=htmlspecialchars($contents); fclose($fp); echo \"<form action=\"$PHP_SELF?page=$page\" method=\" post\">\"; echo \"<textarea name=test rows=20 cols=70 wrap=soft>\"; echo $contents; echo \"</textarea>\"; echo \"<input type=\"submit\" name=\"submitbutton\" value=\"完成\">\"; echo \"</form>\"; } { echo \"<form action=\"$PHP_SELF?action=page\" method=\"post\">\"; echo \"<input type=text size=20 name=page>\"; echo \"<input type=\"submit\" name=\"send\" value=\"选定\">\"; echo \"</form>\"; } ?> 0
相关文章读者评论发表评论 |
|