RE: [PHP] copy() ??
| From: | johnny p. | Date: | Wed, 31 Jan 2001 19:06:02 +0000 |
| Subject: | RE: [PHP] copy() ?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37522@lists.php.net to get a copy of this message | ||
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:ftakle@online.no]
> Sent: Wednesday, January 31, 2001 12:00 PM
> To: php-general@lists.php.net
> 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
> fredrik@takle.net
>
>