Hi gang,
I've got this bit of code to upload an image to a server
$uploaddir = './imagefolder/'; // remember the trailing slash!
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "file uploaded";
}
which works great.
however, because of the way my ISP gives me webspace, there are two seperate domains one starts http://www.xxx.co.uk/ which serves HTML pages, and is good for hosting HTML, CSS and images, and the other is http://ccgi.xxx.co.uk/cgi-bin/ which does the PHP and Perl.
the one that serves HTML pages is much faster than the one that serves scripts, and so I want to put the images on the http://www.xxx.co.uk/imagefolder/
now if I change the value of $imagefolder to the other host, it counts as external, and spits out 'cannot open stream, cannot write to HTTP', which is fair enough.
My question is, is it possible to copy the files accross, or put them on the server to start with? And how do you do it?