Change <Form type='multipart/form-data'
To <Form enctype='multipart/form-data'

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


----- Original Message -----
From: "A.D. Vijverberg" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 23, 2001 4:31 AM
Subject: [PHP] File upload problem


> Hello there,
>
> I am trying to create a form for uploading files to the local intranet.
> Therefore I created a form for uploading files as mentioned in the PHP
> manual. After submitting the form I want to copy the file to the intranet
> with as name the original name on the system of the client. The problem is
> that the file is not being uploaded... The code i have is:
>
> <?
> if ($subactie == ""){
>       // File upload form showen
>             echo "<form type='multipart/form-data'
> action='index.php?actie=formulieren&subactie=upload' method='post'>
>               <input type='hidden' name='MAX_FILE_SIZE' value='100000'
>                     Upload dit bestand: <input name='userfile'
> type='file'><br>
>                     <input type='submit' value='Upload file'>
>                   </form>";
>       }
>
>       if ($subactie == "upload"){
>       // Upload the file
>             if (!copy($userfile, $userfile_name)) {
>             echo "error while uploading!"; }
>             else {
>                   echo "file uploaded successful!";
>             }
>       }
>
> ?>
>
> The file I try to upload (c:\ws_ftp.log which I currently use as randomly
> selected testfile) does exist on the harddisk (selected via the browse
> button). When I execute the code I get the folowing output: "Warning:
Unable
> to open 'C:\\WS_FTP.LOG' for reading: No such file or directory in
> /usr/local/www/intranet.lync.nl/test/service/srv_formulieren.php on line
13
> error while uploading! "
>
> I am sure I overlooked something, but can't find it. I hope someone can
help
> me to find the problem.
>
> Some additional information: The upload_tmp dir. is set to a temp
directory
> in the root of the intranet root. The directory is owned by the same user
as
> the php/apache server is running. This user has all rights on the
directorys
> involved
>
> Thank you all in advance.
>
>
> Kind regards,
>
>
> A.D. Vijverberg
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to