反复测试了很多次,实在是想不到原因,很无奈,所以来求助下
<?php
$filename='adblock.txt';
@
header("Content-Type content='text/html; charset=utf-8'");
if (file_exists($filename) == false) file_put_contents($filename,"");
if (isset($_POST['code'])) {
$code=str_replace('<','',$_POST['code']);
file_put_contents($filename,$code);
@ header("Location: ?");
exit();
};?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>adblock.txt编辑</title>
<style>
.gocode{width:100%;height:400px;background-color: #FCFCFC;border:1px #009ACE solid;font:12px tahoma;line-height:18px;}
.input-code{font-size:9pt;background:#ECF3FC;border-top:1px solid #fff;border-right:1px solid #aaa;border-bottom:1px solid #ccc;border-left:1px solid #fff;}
</style>
</head>
<body>
<center>
<form method='POST'>
<textarea class="gocode" name="code"><?php echo file_get_contents($filename);?>
</textarea>
<br />
<input type="submit" class="input-code" value="保存" />
<span class="code-tishi"></span>
</form>
</center>
</body>
</html>