Re: Re: $HTTP_POST_FILES always produces empty value.
| From: | Patrik Hasibuan | Date: | Mon, 30 Jul 2007 13:49:57 +0000 |
| Subject: | Re: Re: $HTTP_POST_FILES always produces empty value. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-259809@lists.php.net to get a copy of this message | ||
Hi David,
it's solved.
Your advise solved my problem.
Thank you very much.
===
On Mon, 30 Jul 2007 22:03:06 +0930
David Robley <robleyd@ozemail.com.au> wrote:
> Patrik Hasibuan wrote:
>
> > Dear my friends....
> >
> > I don't understand why $HTTP_POST_FILES always produces empty value.
> >
> > This is my code
> > ===
> > //cgi/cgiprodukcatalogadmin.php
> > <?php
> > $berkasgambarproduk=$HTTP_POST_FILES['gambarproduk']['name'];
> > echo "gambarproduk: $gambarproduk<br>";
> > echo "berkasgambarproduk: $berkasgambarproduk<br>";
> > ?>
> > ===
> > This is the output in my Opera internet browser:
> > ===
> > gambarproduk: /tmp/phppd6DZy
> > berkasgambarproduk:
> > ===
> > this is my php.ini:
> > ===
> > ;;;;;;;;;;;;;;;;
> > ; File Uploads ;
> > ;;;;;;;;;;;;;;;;
> >
> > ; Whether to allow HTTP file uploads.
> > file_uploads = On
> >
> > ; Temporary directory for HTTP uploaded files (will use system default if
> > not ; specified).
> > ;upload_tmp_dir =
> > upload_tmp_dir = /srv/www/htdocs/tmpphp
> >
> > ; Maximum allowed size for uploaded files.
> > upload_max_filesize = 100M
> > ===
> >
> > Please tell me, "where is my mistake?".
> >
> > Thank you very much in advance.
>
> Unless you are using an old version of php <4.1.0 you probably should use
> the $_FILES array instead of $_HTTP_POST_FILES
>
> Try that and see what happens. More info at
> http://php.net/file-upload if
> you need it.
>
>
> Cheers
> --
> David Robley
>
> Oxymoron: Working Vacation.
> Today is Sweetmorn, the 65th day of Confusion in the YOLD 3173.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
Patrik Hasibuan <patrikh@penguin-teknologi.com>
Junior Programmer