Why avoid CGI for Python with LAMP hosting?

前端 未结 6 523
春和景丽
春和景丽 2021-01-31 04:52

I have been using PHP for years. Lately I\'ve come across numerous forum posts stating that PHP is outdated, that modern programming languages are easier, more

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 04:59

    Really it's just an efficiency thing - CGI spawns an entire new process for every request, which is quite heavyweight for what it does.

    PHP can be run through CGI as well, but mod_php embeds the interpreter within apache. There's a mod_python which does the same job, and mod_wsgi as Yuval says.

提交回复
热议问题