Differences
This shows you the differences between two versions of the page.
— | devwiki:python_web [2021/08/28 07:51] (current) – created ying | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Python Web CGI Programming Start ====== | ||
+ | |||
+ | * To get everything working for your App.py on web, you need | ||
+ | - Make sure your Web server has register handler for Py file as cgi-script file, mostly likely hosting provide that support python already add that handler, but for local test like xampp, make sure Apache config setting has .py included like this < | ||
+ | AddHandler cgi-script .cgi .pl .asp .py | ||
+ | </ | ||
+ | - add your server python version path to first line of App.py, | ||
+ | - linux example: <code python># | ||
+ | - windows example: <code python># | ||
+ | - put your App.py in cgi-bin folder in your web host or other place | ||
+ | - after upload, change file permission to 755 | ||
+ | |||
+ | * start ref: | ||
+ | * https:// | ||
+ | * php call python subprocess way vs CGI way: | ||
+ | * https:// | ||
+ | |||
+ | ====== Web System Optimize ====== | ||
+ | |||
+ | * https:// | ||