How to run PHP and Web.py together

谁都会走 提交于 2019-12-13 00:34:32

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!