i have a form which allows files to be uploaded. i have no problem with the upload script as it works perfectly within my local web server. As i host it in my hosting server the upload do not work. i have checked for the php settings in both my local server as well as my hosting server. I have set the local settings as in the hosting server with a few things not identical. One is the upload_tmp_dir which is set in my server but not in the hosting server. So, after some googling i could come across the problem of upload_tmp_dir which could be a reason in my case. So, how should i confirm this or solve this problem?
if you would like to view my code, its here:
if you would like to view my code, its here:
Code:
function($fname, $tmpfile){ $ext = str_replace(".","",strtolower(substr($fname, -4, 4))); $new = strtotime("now"); $newname = $new.".".$ext; if(move_uploaded_file($tmpfile, "files/{$newname}")) { ...... then here goes the code to insert the form values along with the file path } }
Comment