hi, i have this PHP code: <?php $uploadsNeeded = 5; for($i = 0; $i < $uploadsNeeded; $i++){ $file_name = $_FILES['uploadFile'. $i]['name']; // strip file_name of slashes $file_name = stripslashes($file_name); $file_name = str_replace("'","",$file_name); $copy = copy($_FILES['uploadFile'. $i]['tmp_name'],$file_name); // prompt if successfully copied if($copy){ echo "<span class=\"style1\"><b>".$file_name."</b> uploaded sucessfully!</span><br><br><br>"; }else{ echo ""; } } ?> PHP: and i want to set the upload folder to "/upload/" because the images are uploading to the root folder. can anybody give a litle help?
just modify this line: $copy = copy($_FILES['uploadFile'. $i]['tmp_name'],[B]"./upload/".[/B]$file_name); Code (markup):
First, you should probably chmod your root folder to 0755 so you can't upload files there as it's a huge security risk. Now chmod upload to 0777 and this your copy(); line to this: $copy = copy($_FILES['uploadFile'. $i]['tmp_name'],'uploads/'.$file_name); PHP: Regards, Dennis M. NOTE: Repost XD was reading the thread, got up, came back and answered sorry