Ok, so I am having to do some work for a client that is hosted on a Windoze server with GoDaddy. Out of the slew of functions disabled by them, the functions I am using are not disabled.
Here is the problem:
A file can be uploaded to the temp directory, but not moved. I can view the full path to the temp dir and the perm dir and they are correct.
I get the error that I can't move the uploaded file using the code below. Any suggestions as to what could be wrong would rock cause this has been an issue for days now. GoDaddy is no help, mainly because they are all sales people.
// echo $pic['tmp_name'];
// outputs d:\temp\12345.tmp
$des = $_SERVER['DOCUMENT_ROOT']."\images\\";
echo $des.$pic['name'];
// outputs d:\hosting\username\images\image.jpg
if(is_uploaded_file($pic['tmp_name'])){
if(move_uploaded_file($pic['tmp_name'], $des.$pic['name'])){
echo "<br>Image was uploaded<br>";
} else {
$err[] = "Could not move the uploaded image.";
}
} else {
$err[] = "Could not upload the image.";
}
TIA.