|
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.
[Back to original message]
|