当前位置:编程学习 > php >>

php在线文本编辑器

作者:leon0324
function write_file($filename,$contents)
{ if ($fp=fopen($filename,"w"))
{
fwrite($fp,stripslashes($contents));
fclose($fp);
return 1 ;
}
else {return 0; }
};
if ($submitbutton=="完成")
{ $rs=write_file(DownloadFilesa2001-12-15$page,"$test");
echo "$page
";
}
elseif ($action=="page")
{ $content=DownloadFilesa2001-12-15$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 "

";
echo "";
echo "";
echo "
";

}
else
{ echo "
";
echo "";
echo "";
echo "
";
}
?>
补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,