php写文件
时间:2010-10-11 来源:w1_xiao
<?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);
}
}
}
?>
$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);
}
}
}
?>
相关阅读 更多 +