I have a very simple upload script:
<?if (isset($POST["send"])) {
$upload_dir ="/www/html/images/";
$file_name= $FILES['userfile']['name'];
$file_path = $upload_dir.$file_name;
echo $file_path;
$temp_name = $_FILES['userfile']['tmp_name'];
move_uploaded_file($temp_name, $file_path);
}
?>
on my local machine (apache server on winxp),I have to set the
$upload_dir to the full path "c:\apache\htdocs\images" for the script to work.
On the remote server,I know only the partial path of the upload directory "/www/html/images"/.The script worked for me only 2 or 3 time (?! Very Strange).
The max upload size on the php.ini is 2M,and I uploaded only 500kb ~ files.
Maybe I have to put the full path ? How can I find it?