You are here: Re: Uploading using POST method « PHP Programming Language « IT news, forums, messages
Re: Uploading using POST method

Posted by Tim Roberts on 11/20/07 06:44

"Bob Bedford" <bob@bedford.com> wrote:
>>>
>>> I've to accept a file that is sent using a POST method.
>>>
>>> The file will be sent using this URL:
>>>
>>> http://username:p...@www.mysite.com/upload.php
>...
>In fact not soo easy...how to get the filename ?
>
>In the case of a form, you get the control name for getting the file like
>this:
>$_FILES['formname']['tmp_name']
>
>But since there is no form, what the name I've to put in place of 'formname'
>?

If you plan to upload a file using a POST request, then your POST request
has to SIMULATE a form. The POST data will include the file's data as a
named field, just like a form would.

Only you know the name of the field, of course.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация