Python 相当于 php 的 virtual()
你知道是否有一个相当于 php 的 virtual()< /代码>
?
我的配置是 python、djanogo、mod_wsgi、apache
尝试包含一个脚本,该脚本仅包含使用上述包含的 php 示例,并且还需要包含在所有网站的页面中。
谢谢
LE:我包括一个 .cgi 脚本
Do you know if there is a python equivalent of php's virtual()
?
My configuration is 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.
Thanks
LE: I'm including a .cgi script
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我看到的唯一参考是
Which states
理论上你可以使用 Apache 2.x 链处理程序功能,其中更多
超过一个内容处理程序可以处理该请求。我说理论上
因为我读过它,但从未尝试过 =)
从 PHP 手册中,
virtual() 是 Apache 特定的函数,类似于 在 mod_include 中。它执行 Apache 子请求。 。 。仅当 PHP 作为 Apache 模块安装时才支持此功能。
以下是有关 Apache 过滤器的信息的链接,这就是“链处理”的含义:
http://httpd.apache.org/docs/2.2/filter.html
该文档应该能够由
mod_include
输出后mod_wsgi
(或者之前,如果这是你想要的)。The only reference to this I see is
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 =)
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.
Here is the link for info about Apache Filters, which is what is meant by "chain handling":
http://httpd.apache.org/docs/2.2/filter.html
The document should be able to be processed by
mod_include
after it's output frommod_wsgi
(or before, if that's what you want).