简体   繁体   English

Python 相当于 php 的 virtual()

[英]Python equivalent of php's virtual()

Do you know if there is a python equivalent of php's virtual() ?你知道是否有一个 python 相当于 php 的virtual()吗?

My configuration is python, djanogo, mod_wsgi, apache我的配置是 python,djanogo,mod_wsgi,apache

Trying to include a script that has only examples for php using the above include and also needs to be included in all website's pages.尝试使用上述包含仅包含 php 示例的脚本,并且还需要包含在所有网站的页面中。

Thanks谢谢

LE: I'm including a.cgi script LE:我包括 a.cgi 脚本

The only reference to this I see is我看到的唯一参考是

http://www.modpython.org/pipermail/mod_python/2004-January/014834.html

Which states In theroy you can use the Apache 2.x chain handlers feature, where more than one content handler can process the request. I say in theroy because I've read about it, but never tried it =)哪些状态In theroy you can use the Apache 2.x chain handlers feature, where more than one content handler can process the request. I say in theroy because I've read about it, but never tried it =) In theroy you can use the Apache 2.x chain handlers feature, where more than one content handler can process the request. I say in theroy because I've read about it, but never tried it =)

From the PHP Manual, virtual() is an Apache-specific function which is similar to <.--#include virtual...--> in mod_include. It performs an Apache sub-request. . . This function is only supported when PHP is installed as an Apache module.从 PHP 手册中, virtual() is an Apache-specific function which is similar to <.--#include virtual...--> in mod_include. It performs an Apache sub-request. . . This function is only supported when PHP is installed as an Apache module. virtual() is an Apache-specific function which is similar to <.--#include virtual...--> in mod_include. It performs an Apache sub-request. . . This function is only supported when PHP is installed as an Apache module.

Here is the link for info about Apache Filters, which is what is meant by "chain handling":这是有关 Apache 过滤器的信息的链接,这就是“链式处理”的含义:

http://httpd.apache.org/docs/2.2/filter.html http://httpd.apache.org/docs/2.2/filter.html

The document should be able to be processed by mod_include after it's output from mod_wsgi (or before, if that's what you want).该文档应该能够在mod_wsgi的 output 之后由mod_include处理(或者之前,如果你想要的话)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM