Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== 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 <code> AddHandler cgi-script .cgi .pl .asp .py </code> - add your server python version path to first line of App.py, - linux example: <code python>#!/usr/bin/python</code> - windows example: <code python>#!C:/Python27/python</code> - 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://wiki.python.org/moin/CgiScripts * php call python subprocess way vs CGI way: * https://stackoverflow.com/questions/14047979/executing-python-script-in-php-and-exchanging-data-between-the-two ====== Web System Optimize ====== * https://developer.yahoo.com/performance/rules.html devwiki/python_web.txt Last modified: 2021/08/28 07:51by ying