简体   繁体   中英

How to move_uploaded_files in php to a customize location

i want to move_uploaded files a folder back in my server directory structure but doesn't seems to work here is my script

$filename='image.jpg';
$path="../folder".$filename;
if(move_uploaded_file($_FILES["uplogo"]["tmp_name"],$path))
    {
        echo "success";
}

the path ../folder is not working and when i do /folder it work so how can i mange my upload in this way

$path="../folder/".$filename;

A forward slash was missing at the end of folder , which means it was trying to move the file to:

../folderimage.jpg

as opposed to:

../folder/image.jpg

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM