Search the Community
Showing results for tags '10.3'.
-
I am attempting to add a feature to my website where users are able to upload images for companies, and when looking at the code for 10.3 I noticed something that confused be on line 28 & 29: if (move_uploaded_file ($_FILES['upload']['tmp_name'], "../uploads/{$_FILES['upload']['name'] }")) { echo '<p><em>The file has been uploaded!</em></p>'; What confuses me about this line is that, up until this point it does not appear that the file has actually been moved to the permanent directory. How can we expect this conditional to ever come back TRUE (since it is a conditional...) if we've never established the permanent directory. It is never established at the end (the actual HTML form) nor the code before the conditionals (ie the HTML header area). Are these two lines supposed to both move the temp file AND act as a conditional? Or have we established this somewhere in the PHP.ini file? Because the PHP.ini file has upload_tmp_dir but not the permanent directory we want it to transfer the temp files to. Am I missing something here? Is this an error?
- 5 replies
-
- move_uploaded_file
- 10.3
-
(and 1 more)
Tagged with: