>From the fine manual:
A file upload screen can be built by creating a special form which looks
something like this:
Example 19-1. File Upload Form
<FORM ENCTYPE="multipart/form-data" ACTION="_URL_" METHOD=POST>
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="1000">
Send this file: <INPUT NAME="userfile" TYPE="file">
<INPUT TYPE="submit" VALUE="Send File">
</FORM>
The _URL_ should point to a PHP file. The MAX_FILE_SIZE hidden field
must precede the file input field and its value is the maximum filesize
accepted. The value is in bytes.
johnny p.
> -----Original Message-----
> From: Fredrik Arild Takle [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 12:00 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] copy() ??
>
>
> I'm trying to upload i file through a webpage...
>
> --> add.php3
> <FORM method="post" action="do_add.php3">
> <input type="file" size=40 name="userfile">
> <INPUT type="submit" name="pub" value="Publiser">
> </form>
>
>
> --> do_add.php3
> copy($userfile, "/imgs/artikler/test.jpg");
> unlink($userfile);
>
> --> ERROR msg..:
> Warning: Unable to create '/imgs/artikler/test.jpg': No such
> file or directory in c:/programfiler/apache
> group/apache/htdocs/do_add.php3 on line 22
>
> --> php.ini
> upload_tmp_dir = c:\programfiler\apache group\apache\htdocs\temp\
>
> Note: I'm currently running the webserver on Win98 (I know, it sucks!)
>
> Any tips anyone?
>
> ---------------------------------
> Fredrik A. Takle
> Bergen, Norway
> [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]