Afficher un message
Vieux 13/06/2008, 20h45   #1
jeremy.gehring@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Manually Calling PHP's request parser for multipart/form-data?

Hey all,

OK I'm not much of a PHP programmer; but needs must as they say. I
have written AJAX file upload system that uses a PERL CGI script so
that a PHP script can get the progress (nifty progress bar).
Everything works great; except that currently I'm not decoding the
POST in PERL; so the data file being written is the actual raw form
data (multipart/form-data) with parameters and file content.

I know that when you make a post to PHP; it's little request wrapper
parses this for you into the $_FILES array. How can I read a file
(the raw form data) and feed it to that parser? I don't seem to be
able to just call SomeObject.parseMe()

Suggestions? I'd rather not; but one idea for a hack I had was to
actually open a URL stream to myself (PHP script) and manually send
the contents of that file to myself (should recreate the POST from the
form) - but that seems rather bad; especially for larger files.

thanks!

Jeremy
  Réponse avec citation
 
Page generated in 0,04473 seconds with 9 queries