问题
I normally web develop in PHP. I am working on a python based project, and want to make a front-end web site for it.
I looked at web.py, and I was wondering if PHP can be used together with web.py, or would I have to rely completely on python as the server side scripting?
Thanks.
回答1:
Combining web.py and PHP doesn't really make sense. But you can definitely set up Apache to have both. You just install mod_php and mod_wsgi. Point mod_wsgi to your web.py WSGI function, and set up your PHP web app in some directory where Apache can find it. You won't be combining the two technologies, but you will have separate web applications on your server that separately use the two technologies.
回答2:
If you're using web.py, you should probably go with Python for server-side scripting. Mixing Python and PHP is definitely possible, but it seems to be going a little too far just to get the features of web.py.
Speaking of the features of web.py, if you want a similar framework I'm sure there are many which express the same principles.
There is one here: http://code.google.com/p/webpy-php-port/ (seems to be dead)
Good luck!
来源:https://stackoverflow.com/questions/5444445/how-to-run-php-and-web-py-together