<br><br><div class="gmail_quote">On Sun, Apr 18, 2010 at 8:53 PM, <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On 16 Apr, 04:24 am, <a href="mailto:tuxattack14@gmail.com">tuxattack14@gmail.com</a> wrote:<br>
>Hi,<br>
>I am trying to use php script on twisted server using twcgi.I want to<br>
>make<br>
>use of http POST method in that.What I want to do is, suppose I am<br>
>having<br>
>one html page say index.html and from that page I want to redirect to<br>
>other<br>
>php page and pass data to that php page using POST method.But I am not<br>
>able<br>
>to access any POST data in php script.When I debugged through<br>
>twcgi.CGIScript.render method, I didn't find any reference to POST<br>
>data.So<br>
>how can i make use of POST data in php ?<br>
<br>
</div></div>I don't really understand the question. You have a lot of stuff going<br>
on here:<br>
<br>
* HTTP POSTs<br>
* Redirects<br>
* CGIScript<br>
* PHP<br>
<br>
Can you try to describe the scenario you're trying to get working step<br>
by step, carefully separating each of these different pieces?<br>
<br>
You may also want to post follow-ups to the twisted-web mailing list<br>
instead.<br>
<br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br>My aim is to build a server that will support file uploading on server and uploading is to be done using web browser.So i selected php script for file upload.<br>I made a simple html form.<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<html><br><body><br><div align="center"><br><br /><br><form enctype="multipart/form-data" action="upload_file.php" method="POST"><br> Please choose a file: <input name="upload_file" type="file" /><br /><br>
<input type="submit" value="Upload" /><br> </form> </body><br></html><br></blockquote><br><br>Now this file is sent using POST method and then it will redirect to a php script named upload_file.php. <br>
So to make use of php i used twcgi.PHPScript. When i checked i am not getting POST data in php code.<br>Execution calls twcgi.CGIScript.render method internally.When i checked in this render method, data sent using POST is available in request.args variable but not sent to php CLI.<br>
Whereas in case of GET method the url is parsed and data sent using GET method is put in qargs variable and then sent to php CLI.<br>