Re: using stdin to get POST content in module version
| From: | jeremy brand | Date: | Fri, 15 Dec 2000 11:46:21 +0000 |
| Subject: | Re: using stdin to get POST content in module version | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30494@lists.php.net to get a copy of this message | ||
Hi Mathieu,
There is an array defined as $HTTP_POST_VARS.
you can also access any form element by it's name, so, for example:
<input type="text" name="crap" value="foo bar">
withing your accepting script, $crap will contain "foo bar".
create a file called phpinfo.php and put in it:
<?php
print phpinfo();
?>
then load this up on your web server, you will see all the CGI
variables.
-jeremy brand
Jeremy Brand :: Sr. Software Engineer :: 408-245-9058 :: jeremy@nirvani.net
http://www.JeremyBrand.com/Jeremy/Brand/Jeremy_Brand.html
for more
Get your own Free, Private email at http://www.smackdown.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
At least for the people who send me mail about a new language that
they're designing, the general advice is: do it to learn about
how to write a compiler. --Dennis Ritchie
On Fri, 15 Dec 2000, Mathieu Poumeyrol wrote:
> Date: Fri, 15 Dec 2000 12:38:08 +0100
> From: Mathieu Poumeyrol <poumeyrol@idm.fr>
> To: php-general@lists.php.net
> Subject: [PHP] using stdin to get POST content in module version
>
> Hi all,
>
> I'm trying to use POST method to get data (raw data, not a file, so I
> can not use <input type="file">) to my database through a PHP script.
>
> Php is running as an apache module on my computer (a linux box), and I
> wonder what is the module equivalent of stdin for cgi. Where can I read
> the POST content ? If I try to open php://stdin, I get a bad file
> descriptor warning message, and fopen fails returning 0.
>
> Any ideas ?
>
> Thanks.
>
> --
> Mathieu Poumeyrol - IDM
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>