Mod_php vs mod_python

Why is mod_python is oop, but mod_php is not?

Example: we go to www.example.com/dir1/dir2

if you use mod_python apache opens www / dir1.py and calls the dir2 method but if you use php module apache opens www / dir1 / dir2 / index.php

+3
source share
6 answers

Tell us about mod_python vs. mod_php.

Since Python is NOT designed specifically for serving web pages, mod_python has to do some extra work.

Because PHP is specifically designed to serve web pages, mod_php simply runs the named PHP module.

mod_python ( mod_fastcgi mod_wsgi) mod_python , Python - , . , - stdout.

mod_wsgi , Python - ( ) . , -.

mod_php , PHP -. , ; HTML.

mod_php , mod_python , mod_wsgi , . -.

php -. mod_wsgi . .

mod_python - , mod_python.

"" . "" , - .

+6

mod_python URL- "RPC-" . PHP. , , .

, mod_python "". , , . , mod_python , URL- , URL-. , (mod_python) URL .

, . , - . , , , .

+4

, , HTTP. http . mod_php, php , , , .

mod_python, , , python. , , . URL- , , .

- mod_python apache, mod_php, , , python webapp, .

+4

PHP - " ", , . , PHP . mod_php - - PHP . HTTP PHP PHP-. PHP- - - , ; script, , , , , .

Python - python. , python , -. , , " " - ( , ), , , mod_python , - python .

0

, , Python PHP , - . ( , Python OO .)

-1
source

Source: https://habr.com/ru/post/1708490/


All Articles