Http Header question

Dave Cragg dcragg at lacscentre.co.uk
Tue Jan 19 18:51:31 EST 2016


Bill,

Take a look at libUrlMultipartForm and libUrlMultipartFormAddPart in the dictionary. There are examples there that might help you.

Cheers
Dave Cragg


> On 19 Jan 2016, at 22:44, William Prothero <prothero at earthednet.org> wrote:
> 
> Folks:
> I’m setting up a php sendmail script using phpSendmail and I’m trying to get the file upload for attachments part working. The examples I find are in html and the “type" is listed as “file”.
> 
> Basically, I’m trying to reproduce this, in a “post” command:
> 
> <html>
>   <body>
> 
>      <form action = "" method = "POST" enctype = "multipart/form-data">
>         <input type = "file" name = "image" />
>         <input type = "submit"/>
> 			
>         <ul>
>            <li>Sent file: <?php echo $_FILES['image']['name'];  ?>
>            <li>File size: <?php echo $_FILES['image']['size'];  ?>
>            <li>File type: <?php echo $_FILES['image']['type'] ?>
>         </ul>
> 			
>      </form>
> 
>   </body>
> </html>
> I figure it is probably a change in the http header, to get php to recognize the file as an upload, but I don’t know how to do this. Somehow, the php needs to get the filepath that I provide it, but ….. 
> 
> Any help would be very appreciated.
> Best,
> Bill




More information about the use-livecode mailing list