用户名: 密码: 忘记密码? 注册

php写文件

作者:  时间: 2010-10-11
<?php
$fn = "";
if (isset($_POST)){
    foreach ($_GET as $key => $value){
        if ($key == "filename"){
                $fn = $value;
                $filedata=file_get_contents("php://input");
                $fp = fopen("./".$fn,"w");
                fputs($fp,$filedata);
                fclose($fp);
        }
    }
}
?>