Hi (again)
I am in a directory
http://ccgi.blah.force9.co.uk/cgi-bin/scriptsdir/
and I need to put an image file in
http://ccgi.blah.force9.co.uk/
i.e. outside the ccgi directory? how do I do that? because it's an image file, if you type "http://ccgi.blah.force9.co.uk/", it says "failed to open stream: HTTP wrapper does not support writeable connections", because it sees it as an external server.
thought it was ../, but alas no!
Also, when I manually just put an image file into the directory with my FTP client, it gives the priveleges of the image file as 000, and I need to set the image with 444? How do I go about integrating that into my code?
$uploaddir = './'; // remember the trailing slash!
$uploadfile = $uploaddir. $_FILES['userfile']['name'];
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "copied";
}
Cheers!