I want to be able to upload any file to a set directory on my NT5 box, i have written the code below to do it, pretty generic i am sure, but i get the error below.
Can anyone help me please.
Warning: Unable to create 'D:\testing\C:\PHP\uploadtemp\php269.tmp': Invalid argument in D:\Website\newsite\php\upload.php on line 20
Error, file not copied
<? $path = "d:\testing\";
if (is_uploaded_file($userfile)) {
$upload_path = "$path/".$userfile_name;
echo $upload_path;
if (file_exists($upload_path)){
print(" Can't create file 'File exists'");
}else{
copy($userfile, $upload_path);
echo " File upload ok";
}
}
?>