Can't work out for the life of me why it isn't working... Everything outputs okay but it won't move the uploaded file... Upload form: <form enctype="multipart/form-data" method="post" action="addimg.php"> <input type="file" name="fileToUpload" /><br /> </div> <input type="submit" value="Upload File" style="width:100%;border:2px solid silver;background:beige;padding:10px;"/> </form> HTML: PHP Code ($dir outputs correctly but is needed as multiple versions of the same website are stored in subfolders from the root folder) //$time = time(); //$fileToUpload = $time . $fileToUpload; $dir = "/uploads/"; echo "<table border=\"1\">"; echo "<tr><td>Client Filename: </td> <td>$time" . $_FILES["fileToUpload"]["name"] . "</td></tr>"; echo "<tr><td>File Type: </td> <td>" . $_FILES["fileToUpload"]["type"] . "</td></tr>"; echo "<tr><td>File Size: </td> <td>" . ($_FILES["fileToUpload"]["size"] / 1024) . " Kb</td></tr>"; echo "<tr><td>Name of Temp File: </td> <td>" . $_FILES["fileToUpload"]["tmp_name"] . "</td></tr>"; echo "</table>"; move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], "/$dir/images/" . $_FILES["fileToUpload"]["name"]); PHP: Is there anything obviously wrong with the code? I've tried taking out the $time function and it still doesn't output correctly. Folder is CHMOD correctly and as I say it all outputs in the table so it's down to the move_uploaded_file function.
The path to the images/ directory may be incorrect. Remember, it's not a URL, it's a pathname so when you start with "/$dir", it assumes the path begins with the server root. Try removing the leading "/" or make the entire path name relative to where the script resides on your server.
Plussy, you're talking to a bot... the link at the end of the sentence "server" isn't a DP ad it's a spam link see other posts from "CatherinJame" here: http://forums.digitalpoint.com/search.php?searchid=9090066
in vbulletin forums when you talk about a PHP function it automatically Links to PHP.NET move_uploadeed_fil is a PHP.net fiunction which will link to its page on most of the wyshwing editors
The user we were talking about has had their reply removed and they appear to have been banned so I think you've missed what we were talking about regarding bots.