|
|
Á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.
²Ä¥|¦æ: ¨ú±on§@Á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¤¤è¦¡Åã¥Ü, ©Ò¥Hn¥s¥¦ª½±µ¦L¥X "¤º¤å" ªºì©l½X.
|
|