[Twisted-Python] Re: [Twisted-commits] How do I serve PHP-files with twisted.web? Answered.

Benjamin Bruheim grolgh at online.no
Tue Oct 1 03:49:50 EDT 2002


Glyph Lefkowitz wrote:
>>How do I serve PHP-files with twisted.web? Answered.
> This answer appears to be unnecessarily complex and confusing, when the user
> could just do "mktap web --path . --allow-ignore-ext" and get the same effect.
> (You probably want --index index.php too.) Is there any particular reason you
> answered that way? :)

Because it has been asked at least three times. :) Perhaps it could be 
changed into "how do I create a resource that serves PHP-Files", because 
the "create webserver"-part is explained a lot better other places. But 
I just wanted a complete example where just one line could be changed.

And, to do this in updateApplication:
resource.processors[".php"] = twcgi.PHPScript
Would not be saved in the tap, which is why I solved it this way. After 
all, I think if you're developing this is the info you would be 
interested in.

\\ benjamin bruheim





More information about the Twisted-Python mailing list