阅读背景:

move_uploaded_file将文件放在目标目录之外

来源:互联网 

I currently have the following:

我目前有以下内容:

    if (in_array($_FILES['userfile']['type'], $mimeTypes))
      {

$target_path = "./uploads/{$_SESSION['email']}";

$target_path = $target_path . basename( $_FILES['userfile']['name']);

if(move_uploaded_file($_FILES['userfile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['userfile']['name']).
    " has been uploaded";

} else{
    echo "There was an error uploading the file, please try again!";
}
 



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: