====== 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: #!/usr/bin/python - windows example: #!C:/Python27/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://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