时间:2021-07-01 10:21:17 帮助过:22人阅读
upload test
$rid = isset($_POST['rid'])? $_POST['rid'] : '';
$uid = isset($_POST['uid'])? $_POST['uid'] : '';
if($rid==''
------解决思路----------------------
$uid==''){
exit('rid or uid error');
}
$folder = $rid.'/'.$uid;
mkdir($folder,0777,true);
$tmp_name = $_FILES["photo"]["tmp_name"];
$name = $_FILES["photo"]["name"];
move_uploaded_file($tmp_name, $folder.'/'.$name);
echo 'success';
?>