开发者

.htaccess to execute other version of python

开发者 https://www.devze.com 2023-01-26 17:27 出处:网络
on my wev server python is by default 2.4 I also have python 2.5 which I want to make sefault via .htaccess file.

on my wev server python is by default 2.4 I also have python 2.5 which I want to make sefault via .htaccess file.

what's the directive to make /usr/bin/python2.5 the def开发者_开发知识库ault python?

10x


There isn't one. Specify it in the shebang line of the CGI scripts you want it to run.


If you are running Python as a CGI binary, look for a shebang line in each CGI script. For example, change:

#!/usr/bin/env python

to

#!/usr/bin/env python2.5

That's the way CGI works; it's not possible to specify a default in .htaccess.

0

精彩评论

暂无评论...
验证码 换一张
取 消