June 12th, 2000, 02:16 PM
I'm new to PHP and want to upload files to a web server. At the mo I'm testing it on my home PC.
This is the HTML and the PHP i am using:
<Form Enctype="multipart/form-data" ACTION="upload3.php" method="post">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="4096">
<input name="uploadedfile" type="file">
<input type="Submit" value="upload">
$uploadedfile = stripslashes($uploadedfile);
$path1 = "http://localhost/Gareth/";
$dest = $path1 . $uploadedfile_name;
print ("The uploaded path is $dest<br>n");
print ("Local File: $uploadedfile <br>n");
print ( "name: $uploadedfile_name <br>n");
print ( "Size: $uploadedfile_size <br>n");
print ( "Type: $uploadedfile_type <br>n");
This is what is returned to me.
Warning: Unable to create 'http://localhost/Gareth/apache_pb.doc': No such process in C:Program FilesApache GroupApachehtdocs/Gareth/upload3.php on line 16
The uploaded path is http://localhost/Gareth/apache_pb.gif
Local File: php2
Anyone had similar problems...?
June 12th, 2000, 05:46 PM
Doesn't the path where you are trying to copy the file to have to be an actual path, such as
instead of an http path.
hope that is clear...
June 13th, 2000, 12:18 AM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by SepodatiCreations:
[B]Doesn't the path where you are trying to copy the file to have to be an actual path, such as
Warning: Unable to create 'http://localhost/Gareth/apache_pb.doc': No such process in C:Program FilesApacheGroupApachehtdocs/Gareth/upload3.php on line 16
It is instantly clear from the error it goes from forward slashes to backslashes ( you have a file directory convention problem) try putting the absolute path using the backslashes instead of the forward slashes as previously suggested.