¤¤Á¯­º­¶ ³Ì·s®ø®§ µ{¦¡¤U¸ü »¡©ú¤å¥ó
¤¤Á¯ªÀ°Ï ¶}µo¤p²Õ ÁcÅé¦rª© English
¤¤Á¯¤åÀÉ
¤¤Á¯¤Jªù
µ{¦¡½d¨Ò
°Ñ¦Ò¤â¥U
 
µ{¦¡½d¨Ò
¤¤Á¯¥[ªo
Ác²¤¬´«
º~¦r°ò¦]¦r¨å
°Ñ¦Ò¤â¥U²£¥Í¾¹
 
¹q¶l§Ú­Ì
glaze at chinesepython.org
 
Google

 
  

Ác²¤¬´«µ{¦¡, ¤¤Á¯ºô¯¸©Ò¥Î

¦]¬°¤¤Á¯¤º«Ø¤F¹ï¤j¤­©M°ê¼Ð½Xªº¤ä«ù. ©Ò¥H³oÅܦ¨¤@¥ó¤Q¤À®e©öªº¨Æ.

#!/home/glace/share/bin/cpython -bS

¸ü¤J os
¼g "Content-type: text/html\n\n"
¤å¥ó = os.getenv('PATH_TRANSLATED')
¤º¤å =  ¥´¶}(¤å¥ó, "r").Ū¤J(20000).¤j¤­ÅÜ°ê¼Ð()
¼g ¤º¤å.­ì©l½X()
¥u¦³ 6 ¦æ¦Ó¤w !!
  • ²Ä¤@¦æ¬O§i¶D¦øªA¾¹¨ì­þùØ¥h§ä¤¤Á¯§YĶ¾¹. ³o¬O unix ¤W±`¥Îªº¤èªk. -bS ¿ï¶µ«ü¥O§YĶ¾¹¸ü¤J®É¥Î¤j¤­§@¬°¥Ø«e½s½X (b ¬O BIG5 ªº·N«ä), S «h¥Nªí¤£¥²¸ü¤J site.py ³o­Ó¼Ò²Õ. ³o¼Ë¥i¥H§Ö¤@¨Ç.
  • ²Ä¤G¦æ: ¸ü¤J os ¼Ò²Õ. ¦]¬°§Ú­Ì»Ý­n°Ý 'PATH_TRANSLATED' ³o­ÓÀô¹ÒÅܶq, ¦Ó¬d°ÝÀô¹ÒÅܶqªº¥\¯à¦b os ¼Ò²Õ¤¤. ¥Ø«e¸Ó¼Ò²ÕÁÙ¨S¦³¤¤Ä¶¥», ¦]¦¹¥Î­^¤å­ìª©´N¦æ.
  • ²Ä¤T¦æ: ¼g¥X HTTP ³q°T¨ó©wªº¼ÐÀY.
  • ²Ä¥|¦æ: ¨ú±o­n§@Ác²¤¬´«ªº¤å¥ó¦WºÙ. ¦pªG§Aµ¹¥Xªº URL ¬°
     http://chinesepython.sourceforge.net/cgi-bin/cgb/mypath/file.hthml 
    «hÀô¹ÒÅܶq·|³]¦¨ "¥»¾÷¸ô®|/mypath/file.html", §A¥i¥H¥Î¸Ó¸ô®|§ä¨ì¸ÓÀɪº¦ì¸m.
  • ²Ä¤­¦æ: ±æ¤å¥Í·N¥i¤]. ¥´¶}­è¤~ªº¤å¥ó, Ū¤J³Ì¦h 20000 ­Ó¦ì¤¸ (¤j¬ù 1 ¸U­Ó¦r¤F, ´¶³qºô­¶À³¸Ó°÷¥Î¦³¾l¤F. µM«á§âŪ¶i¨Óªº¤º®e (À³¬°¤j¤­½X) Âন°ê¼Ð. Âà´«µ²ªG©ñ¨ì "¤º¤å" ³o­ÓÅܶq¤¤.
  • ²Ä¤»¦æ: ¦L¥X "¤º¤å" ªº­ì©l½X (°ê¼Ð½X). ª`·N: ¦]¬°§Ú­Ì±Ò°Ê¤¤Á¯§YĶ¾¹®É¬O¥Î¤F¤j¤­½X§@¥Ø«e¤¤¤å½s½X, ¦]¦¹¦pªGª½±µ¼g¥X "¤º¤å" ªº¸Ü, ¤¤Á¯·|¹Á¸Õ§â°ê¼Ð½Xªº¤º¤å¥H¤j¤­¤è¦¡Åã¥Ü, ©Ò¥H­n¥s¥¦ª½±µ¦L¥X "¤º¤å" ªº­ì©l½X.