SSIÖ¸Áî

5年以前  |  阅读数:284 次  |  编程语言:PHP 

ʲôÊÇ SHTML
ʹÓÃSSI£¨Server Side Include£(C)µÄhtmlÎļþÀ(C)Õ¹Ãu£¬SSI£¨Server Side Include£(C)£¬Í¨³£³ÆΪ¡°þÎñÆ÷¶Ë
ǶÈe¡±»oÕ߽С°
þÎñÆ÷¶Ë°uº¬¡±£¬ÊÇÒ»ÖÖÀaËÆÓÚASPµÄ»uÓÚþÎñÆ÷µÄÍøÒ³ÖÆ×÷¼¼Êo¡£
SSI¹¤×÷Ô­Ài£º
½«ÄÚÈÝ
¢Ë͵½a¯ÀÀÆ÷֮ǰ£¬¿ÉÒÔʹÓá°þÎñÆ÷¶Ë°uº¬ (SSI)¡±Ö¸Ái½«Îı¾¡¢Í¼ÐλoÓ¦ÓóÌÐoÐÅÏ¢°uº¬µ½ÍøÒ³
ÖС£ÀýÈ磬¿ÉÒÔʹÓà SSI °uº¬Ê±¼a/ÈÕÆÚ´Á¡¢°aeȨÉuÃ÷»o¹(C)¿Í»§Ìiд²¢
µ»ØµÄ±iµ¥¡£¶ÔÓÚÔÚ¶a¸oÎļþÖÐÖظ´
³oÏÖµÄÎı¾»oͼÐΣ¬Ê¹Óðuº¬ÎļþÊÇÒ»ÖÖ¼o±aµÄ½¨¡£½«ÄÚÈÝ´aeÈeÒ»¸o°uº¬ÎļþÖм´¿É£¬¶ø²»±Ø½«ÄÚÈÝÊaÈe
ËuÓÐÎļþ¡£Í¨¹ýÒ»¸odz£¼oµ¥µÄÓi¾a¼´¿Éµ÷Óðuº¬Îļþ£¬´ËÓi¾aָʾ Web þÎñÆ÷½«ÄÚÈݲaÈeÊʵ±ÍøÒ³¡£¶ø
ÇÒ£¬Ê¹Óðuº¬Îļþʱ£¬¶ÔÄÚÈݵÄËuÓиu¸ÄÖ»ÐeÔÚÒ»¸oµØ½¾ÍÄÜÍe³É¡£
ÒoΪ°uº¬ SSI Ö¸ÁiµÄÎļþÒªÇoÌØÊa´¦Ài£¬ËuÒÔ±ØÐeΪËuÓÐ SSI Îļþ¸³Óe SSI ÎļþÀ(C)Õ¹Ãu¡£Ä¬ÈÏÀ(C)Õ¹ÃuÊÇ
.stm¡¢.shtm ºÍ .shtml¡£
Web
þÎñÆ÷ÔÚ´¦ÀiÍøÒ³µÄͬʱ´¦Ài SSI Ö¸Ái¡£µ± Web þÎñÆ÷Óoµ½ SSI Ö¸Áiʱ£¬Ö±½Ó½«°uº¬ÎļþµÄÄÚÈݲa
Èe HTML ÍøÒ³¡£Èç¹u¡°°uº¬Îļþ¡±Öаuº¬ SSI Ö¸Ái£¬Ôoͬʱ²aÈe´ËÎļþ¡£³ýÁËÓÃÓÚ°uº¬ÎļþµÄ»u±¾Ö¸ÁiÖ®
Ía£¬»¹¿ÉÒÔʹÓà SSI Ö¸Ái²aÈeÎļþµÄÏa¹ØÐÅÏ¢£¨ÈçÎļþµÄ´oС£(C)»oÕßÔËÐÐÓ¦ÓóÌÐo»o shell ÃuÁi¡£
Íøվά»¤³£³£Åoµ½µÄÒ»¸oÎÊÌaÊÇ£¬ÍøÕ¾µÄ½a¹¹ÒѾ­¹Ì¶¨£¬È´ÎªÁ˸uÐÂÒ»µaÄÚÈݶø²»µÃ²»ÖØ×oÒ»´oÅuÍøÒ³¡£
SSIÌa¹(C)ÁËÒ»ÖÖ¼oµ¥¡¢ÓÐЧµÄ
½¨À´½a¾oÕaÒ»ÎÊÌa£¬Ëu½«Ò»¸oÍøÕ¾µÄ»u±¾½a¹¹ÅÔÚ¼¸¸o¼oµ¥µÄHTMLÎļþÖУ¨
Ä£°a£(C)£¬ÒÔºoÎÒÃÇÒª×oµÄÖ»Êǽ«Îı¾´«µ½þÎñÆ÷£¬ÈóÌÐo°´ÕÕÄ£°a×Ô¶¯Éu³ÉÍøÒ³£¬´Ó¶øʹ¹ÜÀi´oÐÍÍøÕ¾±aµÃ
ÈÝÒס£
ËuÒÔ£¬ÀuÓÃSHTML¸ñʽµÄÒ³ÃaeÄ¿µÄºÍ ASP ²i²»¶a£¬µ«ÊÇÒoΪÊÇ API ËuÒÔÔËתËٶȸu¿i£¬Ð§Âʸu¸ß£¬±ÈASP¿i
£¬±ÈHTMLÂý£¬µ«ÓÉÓÚ¿ÉÒÔʹÓÃ
þÎñÆ÷¶Ë°uº¬£¬Òo´ËʹҳÃae¸uÐÂÈÝÒ×£¨ÌرðÊÇÅuÁ¿¸uÐÂbanner£¬°aeȨµÈ£(C)£¬Ïe
Ïoһϰɣ¬ÄaÓÐÒ»¶Î HTML£¬ÒªÔÚÖмa´(C)²aÒ»Ð(C)ÌØÊaµÄþÎñ¶Ë½Å±¾£¬±ÈÈç²aÈeÆaËu HTML ¶ÎÂa£¬ÄaÑ¡Ôñ ASP
À´Íe³ÉÕa¸oÈÎÎñ£¬µ«ÊÇÈç¹uÈÎÎñ¸u
±ÖØ£¬ÐeÒª¸u¶aµÄʱ¼a£¬±ÈÈç 5 s£¬Õa¸oʱºoÄa²»Óà ASP ¶øÓà SHTML£¬
»oÐi´¦Àiʱ¼a¾ÍÖ»Óà 4s ÁË¡£
SSIÓÐʲôÓã¿
Ö®ËuÒÔÒª³¶µ½ SSI£¬ÊÇÒo ' Shtml - Server-Parsed HTML µÄÊ××ÖĸËoÂÔ´Ê¡£°uº¬ÓÐǶÈeʽþÎñÆ÷½°uº¬Ãu
ÁiµÄ HTML Îı¾¡£ÔÚ±»´«Ë͸øa¯ÀÀÆ÷֮ǰ£¬þÎñÆ÷»a¶Ô SHTML Îĵµ½øÐÐÍeÈ«µØ¶ÁÈ¡¡¢ÖÎoÒÔ¼°Ð޸ġ£shtml
ºÍasp ÓÐÒ»Ð(C)ÏaËÆ£¬ÒÔshtmlÃuÃuµÄÎļþÀi£¬Ê¹ÓÃÁËssiµÄÒ»Ð(C)Ö¸Ái£¬¾ÍÏñaspÖеÄÖ¸Ái£¬Äa¿ÉÒÔÔÚSHTMLÎļþ
ÖÐдÈeSSIÖ¸Ái£¬µ±¿Í»§¶ËÃÎÊÕaÐ(C)shtmlÎļþʱ£¬þÎñÆ÷¶Ë»a°ÑÕaÐ(C)SHTMLÎļþ½øÐжÁÈ¡ºÍ½aÊÍ£¬°ÑSHTMLÎÄ
¼þÖаuº¬µÄSSIÖ¸Ái½aÊͳoÀ´±ÈÈ磺Äa¿ÉÒÔÔÚSHTMLÎļþÖÐÓÃSSIÖ¸ÁiÒýÓÃÆaËuµÄhtmlÎļþ£¨#include £(C)£¬þ
ÎñÆ÷´«Ë͸ø¿Í»§¶ËµÄÎļþ£¬ÊÇÒѾ­½aÊ͵ÄSHTML²»»aÓÐSSIÖ¸Ái¡£ËuʵÏÖÁËHTMLËuûÓеŦÄÜ£¬¾ÍÊÇ¿ÉÒÔʵÏÖ
Á˶¯Ì¬µÄSHTML£¬¿ÉÒÔ˵ÊÇHTMLµÄÒ»ÖÖ½ø»¯°É¡£ÏñÐÂÀ˵ÄÐÂÎÅϵͳ¾ÍÊÇÕaÑuµÄ£¬ÐÂÎÅÄÚÈÝÊǹ̶¨µÄµ«ËuÉÏÃae
µÄ¹a¸aeºÍ²Ëµ¥µÈ¾ÍÊÇÓÃ#includeÒýÓýøÀ´µÄ¡£
Ä¿Ç°£¬Ö÷ÒªÓÐÒÔϼ¸ÖÖÓÃÓÃ;£º
ÏÔʾ
þÎñÆ÷¶Ë»¾³±aÁ¿<#echo>
½«Îı¾ÄÚÈÝÖ±½Ó²aÈeµ½ÎĵµÖÐ<#include>
ÏÔʾWEBÎĵµÏa¹ØÐÅÏ¢<#flastmod #fsize> (ÈçÎļþÖÆ×÷ÈÕÆÚ/´oСµÈ)
Ö±½ÓÖ´ÐÐ
þÎñÆ÷Éϵĸ÷ÖÖ³ÌÐo<#exec>(ÈçCGI»oÆaËu¿ÉÖ´ÐгÌÐo)
ÉeÖÃSSIÐÅÏ¢ÏÔʾ¸ñʽ<#config>(ÈçÎļþÖÆ×÷ÈÕÆÚ/´oСÏÔʾ½Ê½)
¸ß¼¶SSI¿ÉÉeÖñaÁ¿Ê¹ÓÃifÌo¼þÓi¾a¡£
ʹÓÃSSI
SSIÊÇΪWEB
þÎñÆ÷Ìa¹(C)µÄÒ»Ì×ÃuÁi£¬ÕaÐ(C)ÃuÁiÖ»ÒªÖ±½ÓǶÈeµ½HTMLÎĵµµÄ×¢ÊÍÄÚÈÝÖ®Öм´¿É¡£È磺

¾ÍÊÇÒ»ÌoSSIÖ¸Ái£¬Æa×÷ÓÃÊǽ«"info.htm"µÄÄÚÈÝ¿½±´µ½µ±Ç°µÄÒ³ÃaeÖУ¬µ±ÃÎÊÕßÀ´a¯ÀÀʱ£¬»a¿´µ½ÆaËu
HTMLÎĵµÒ»ÑuÏÔʾinfo.htmÆaÖеÄÄÚÈÝ¡£ÆaËuµÄSSIÖ¸ÁiʹÓÃÐÎʽ»u±¾Í¬¸Õ²ÅµÄ¾ÙÀý²i²»¶a£¬¿É¼uSSIʹÓÃÖ»
ÊDzaÈeÒ»µa´uÂe¶øÒÑ£¬Ê¹ÓÃÐÎʽ
dz£¼oµ¥¡£µ±È»£¬Èç¹uWEBþÎñÆ÷²»Ö§³ÖSSI£¬Ëu¾Í»aÖ»²»¹ý½«Ëuµ±×÷×¢ÊÍÐÅ
Ï¢£¬Ö±½ÓÌø¹ýÆaÖеÄÄÚÈÝ£»a¯ÀÀÆ÷Ò²»aºoÂÔÕaÐ(C)ÐÅÏ¢¡£
ÈçºÎÔÚÎÒµÄWEB
þÎñÆ÷ÉÏÅaÖÃSSI¹¦ÄÜ£¿
ÔÚÒ»Ð(C)WEBþÎñÆ÷ÉÏ£¨ÈçIIS 4.0/SAMBAR 4.2£(C)£¬°uº¬ #include Ö¸ÁiµÄÎļþ±ØÐeʹÓÃÒѱ»Ó³Éaµ½ SSI ½aÊÍ
³ÌÐoµÄÀ(C)Õ¹Ãu£»
ñÔo£¬Web þÎñÆ÷½«²»»a´¦Ài¸ÃSSIÖ¸Ái£»Ä¬ÈÏÇe¿oÏ£¬À(C)Õ¹Ãu .stm¡¢.shtm ºÍ .shtml ±»
Ó³Éaµ½½aÊͳÌÐo£¨Ssinc.dll£(C)¡£
ApacheÔoÊǸu¾ÝÄaµÄÉeÖÃÇe¿o¶ø¶¨£¬ÐÞ¸Äsrm.confÈ磺
AddType text/x-server-parsed-html .shtml ½«Ö»¶Ô.shtmlÀ(C)Õ¹ÃuµÄÎļþ½aÎoSSIÖ¸Ái
AddType text/x-server-parsed-html .html ½«¶ÔËuÓÐHTMLÎĵµ½aÎoSSIÖ¸Ái
Netscape WEB
þÎñÆ÷Ö±½ÓʹÓà Administration Server(¹ÜÀiþÎñÆ÷)¿É´o¿ªSSI¹¦ÄÜ¡£
Website ʹÓà Server Admin ³ÌÐoÖÐµÄ Mapping ±eÇ(C)£¬À(C)Õ¹ÃuÌi¼ÓÄÚÈÝÀaÐÍΪ£ºwwwserver/html-ssi
Cern
þÎñÆ÷²»Ö§³ÖSSI£¬¿ÉÓÃSSIÕ(C)Æ­¨£¬µ½ http://sw.cse.bris.ac.uk/WebTools/fakessi.html ÉÏÏÂÔØ
Ò»¸oPERL½Å±¾£¬¼´¿ÉʹÄaµÄCERN
þÎñÆ÷ʹÓÃÒ»Ð(C)SSIÖ¸Ái¡££¨²»Ö§³ÖexecÖ¸Ái¡££(C)
SSIÖ¸Ái»u±¾¸ñʽ
³ÌÐo´uÂe£º

˵Ã÷£º

ÊÇHTMLÓi*¨ÖбiʾעÊÍ£¬µ±WEB*þÎñÆ÷²»Ö§³ÖSSIʱ£¬»aºoÂÔÕaÐ(C)ÐÅÏ¢¡£

include ΪSSIÖ¸ÁiÖ®Ò»¡£

file ΪincludeµÄ²ÎÊý£¬ info.htmΪ²ÎÊýÖµ£¬ÔÚ±¾Ö¸ÁiÖÐÖ¸½«Òª°uº¬µÄÎĵµÃu¡£
×¢Òa£º

ʾÀý£º

±¾ÎĵµÃu³Æ ÏÖÔÚʱ¼a ÄaµÄIPµØÖ*

include ʾ*¶

×÷Ó㺽«Îı¾ÎļþµÄÄÚÈÝÖ±½Ó²aÈeµ½ÎĵµÒ³ÃaeÖС£
Ói*¨£º

file ÎļþÃuÊÇÒ»¸oÏa¶Ô¾¶£¬¸Ã¾¶Ïa¶ÔÓÚʹÓà #include Ö¸ÁiµÄÎĵµËuÔÚµÄĿ¼¡£±»°uº¬Îļþ¿ÉÒÔÔÚͬ
Ò»¼¶Ä¿Â¼»oÆa×ÓĿ¼ÖУ¬µ«²»ÄÜÔÚÉÏÒ»¼¶Ä¿Â¼ÖС£Èç±iʾµ±Ç°Ä¿Â¼ÏµĵÄnav_head.htmÎĵµ£¬ÔoΪ
file="nav_head.htm"¡£
virtual ÎļþÃuÊÇ Web Õ¾µaÉϵÄÐeÄaĿ¼µÄÍeÕu¾¶¡£Èç±iʾÏa¶ÔÓÚþÎñÆ÷Îĵµ¸uĿ¼ÏÂhoyiĿ¼ÏµÄ
nav_head.htmÎļþ£»ÔoΪfile="/hoyi/nav_head.htm"
²ÎÊý£º
file Ö¸¶¨°uº¬ÎļþÏa¶ÔÓÚ±¾ÎĵµµÄλÖÃ
virtual Ö¸¶¨Ïa¶ÔÓÚþÎñÆ÷Îĵµ¸uĿ¼µÄλÖÃ
×¢Òa£º
ÎļþÃu³Æ±ØÐe´øÓÐÀ(C)Õ¹Ãu¡£
±»°uº¬µÄÎļþ¿ÉÒÔ¾ßÓÐÈκÎÎļþÀ(C)Õ¹Ãu£¬ÎÒ¾oµÃÖ±½ÓʹÓÃhtmÀ(C)Õ¹Ãu×i
½±a£¬Î¢Èi¹«Ë¾ÍƼoʹÓà .inc À(C)Õ¹
Ãu£¨Õa¾Í¿´ÄaµÄ°®ºÃÁË£(C)¡£
ʾÀý£º

½«Í*Îļþ²aÈeµ½µ±Ç°Ò³Ãae ½«Î²Îļþ²aÈeµ½µ±Ç°Ò³Ãae

flastmod ºÍ #fsize ʾ*¶

×÷Óãº

flastmod Îļþ×i½u¸uÐÂÈÕÆÚ

fsize ÎļþµÄ³¤¶È

Ói*¨£º

²ÎÊý£º
file Ö¸¶¨°uº¬ÎļþÏa¶ÔÓÚ±¾ÎĵµµÄλÖà Èç info.txt ±iʾµ±Ç°Ä¿Â¼ÏµĵÄinfo.txtÎĵµ
virtual Ö¸¶¨Ïa¶ÔÓÚ*þÎñÆ÷Îĵµ¸uĿ¼µÄλÖà Èç /hoyi/info.txt ±iʾ
×¢Òa£ºÎļþÃu³Æ±ØÐe´øÓÐÀ(C)Õ¹Ãu¡£
ʾÀý£º

½«µ±Ç°Ä¿Â¼ÏÂnews.htmÎļþµÄ×i½u¸uÐÂÈÕÆÚ²a²aÈeµ½µ±Ç°Ò³Ãae ½«µ±Ç°Ä¿Â¼ÏÂnews.htmµÄÎļþ´oСÈeµ½µ±Ç°Ò³Ãae

exec ʾ*¶

×÷Ó㺽«Ä³Ò»Ía²¿³ÌÐoµÄÊa³o²aÈeµ½Ò³ÃaeÖС£¿É²aÈeCGI³ÌÐo»oÕßÊdz£¹aeÓ¦ÓóÌÐoµÄÊaÈe£¬ÕaÈ¡¾oÓÚʹÓõÄ
²ÎÊýÊÇcmd»¹ÊÇcgi¡£
Ói*¨£º

²ÎÊý£º
cmd ³£¹aeÓ¦ÓóÌÐo
cgi CGI½Å±¾³ÌÐo
ʾÀý£º

½«»aÏÔʾÃÜÂeÎļþ ½«»aÏÔʾµ±Ç°Ä¿Â¼ÏÂÎļþÁбi ½«»aÖ´ÐÐCGI³ÌÐogb.cgi¡£ ½«»aÖ´ÐÐCGI³ÌÐoaccess_log.cgi¡£

×¢Òa£º´ÓÉÏÃaeµÄʾÀý¿ÉÒÔ¿´³o£¬Õa¸oÖ¸ÁiÏaµ±½±a£¬µ«ÊÇÒ²´aeÔÚ°²È«ÎÊÌa¡£
½uÖ¹
½*¨£º
Apache£¬½«access.confÖеÄ"Options Includes ExecCGI"ÕaÐдuÂeɾ³ý£»
ÔÚIISÖУ¬Òª½uÓà #exec ÃuÁi£¬¿ÉÐÞ¸Ä SSIExecDisable ÔªÊý¾Ý¿a£»

config

×÷ÓãºÖ¸¶¨µ»Ø¸ø¿Í»§¶Ëa¯ÀÀÆ÷µÄ´iÎoÐÅÏ¢¡¢ÈÕÆÚºÍÎļþ´oСµÄ¸ñʽ¡£
Ói
¨£º

²ÎÊý£º
errmsg ×Ô¶¨ÒaSSIÖ´ÐдiÎoÐÅÏ¢£¬¿ÉÒÔΪÈκÎÄaϲ»¶µÄ½Ê½¡£
sizefmt Îļþ´oСÏÔʾ
½Ê½£¬Ä¬ÈÏΪ×ֽڽʽ("bytes")¿ÉÒÔ¸ÄΪǧ×ֽڽʽ("abbrev")
timefmt ʱ¼aÏÔʾ*½Ê½£¬×iÁe»iµÄÅaÖÃÊoÐÔ¡£
ʾÀý£ºÏÔʾһ¸o²»´aeÔÚÎļþµÄ´oС

ÒÔǧ×ֽڽʽÏÔʾÎļþ´oС
Ói
¨£º

ÒÔÌض¨µÄʱ¼a¸ñʽÏÔʾʱ¼a

ÏÔʾ½ñÌiÊÇÐÇÆÚ¼¸£¬¼¸Ô£¬Ê±Çø

XSSI
XSSI£¨Extended SSI£(C)ÊÇÒ»×e¸ß¼¶SSIÖ¸Ái£¬ÄÚÖÃÓÚApache 1.2»o¸u¸ß°ae±¾µÄmod-includeÄ£¿eÖ®ÖС£ÆaÖпÉ
ÀuÓõĵÄÖ¸ÁiÓУº

printenv

set

if

printenv

×÷Ó㺠ÏÔʾµ±Ç°´aeÔÚÓÚWEBþÎñÆ÷»¾³ÖеÄËuÓл¾³±aÁ¿¡£
Ói
¨£º

set

×÷Ó㺿ɸø±aÁ¿¸³Öµ£¬ÒÔÓÃÓÚºoÃaeµÄifÓi¾a¡£
Ói*¨£º

ʾÀý£º

if

×÷Ó㺴´½¨¿ÉÒԸıaÊý¾ÝµÄÒ³Ãae£¬ÕaÐ(C)Êý¾Ý¸u¾ÝʹÓÃifÓi¾aʱ¼ÆËaµÄÒªÇoÓeÒÔÏÔʾ¡£
Ói*¨£º

ÏÔʾÄÚÈÝ

ÏÔʾÄÚÈÝ

ÏÔʾÄÚÈÝ

ʾÀý£º

»¶Ó­¹aÁÙºÃÒ×CGI¹¤³§ÔÚ×Ͳ(C)ÈÈÏßµÄ*ÖÕ¾ http://hoyi.zb169.net¡£

»¶Ó­¹aÁÙºÃÒ×CGI¹¤³§ÔÚÌ«Ño³ÇµÄ*ÖÕ¾ http://linux.cqi.com.cn/~hoyi¡£

»¶Ó­¹aÁÙºÃÒ×CGI¹¤³§£¡

×¢Òa£ºÓÃÓÚÇ°ÃaeÖ¸ÁiÖеĴб¸Ü£¬ÊÇÓÃÀ´´u»»ÄÚ²¿µÄÒýºÅ£¬ÒÔ±aËuÃDz»»a±»½aÊÍΪ½aÊø±i´iʽ¡£²»¿ÉÊ¡ÂÔ¡£
1¡¢Config ÃuÁi
Config ÃuÁiÖ÷ÒªÓÃÓÚÐÞ¸ÄSSIµÄĬÈÏÉeÖá£ÆaÖУº
Errmsg£ºÉeÖÃĬÈÏ´iÎoÐÅÏ¢¡£ÎªÁËÄܹ»Õý³£µÄ
µ»ØÓû§Ée¶¨µÄ´iÎoÐÅÏ¢£¬ÔÚHTMLÎļþÖÐErrmsg²ÎÊý±ØÐe±»Å
ÖÃÔÚÆaËuSSIÃuÁiµÄÇ°Ãae£¬
ñÔo¿Í»§¶ËÖ»ÄÜÏÔʾĬÈϵĴiÎoÐÅÏ¢£¬¶ø²»ÊÇÓÉÓû§Ée¶¨µÄ×Ô¶¨ÒaÐÅÏ¢¡£

Timefmt£º¶¨ÒaÈÕÆÚºÍʱ¼aµÄʹÓøñʽ¡£Timefmt²ÎÊý±ØÐeÔÚechoÃuÁi֮ǰʹÓá£

ÏÔʾ½a¹uΪ£º
Wednesday£¬ April 12£¬ 2000
Ò²ÐiÓû§¶ÔÉÏÀýÖÐËuʹÓõÄ%A %B %d¸Ðµ½ºÜÄ°Éu£¬ÏÂÃaeÎÒÃǾÍÒÔ±i¸ñµÄÐÎʽ×ܽaÒ»ÏÂSSIÖнÏΪ³£ÓõÄÒ»Ð(C)
ÈÕÆÚºÍʱ¼a¸ñʽ¡£
Sizefmt£º¾o¶¨Îļþ´oСÊÇÒÔ×Ö½Ú¡¢Ç§×Ö½Ú»¹ÊÇÕ××Ö½ÚΪµ¥Î»±iʾ¡£Èç¹uÒÔ×Ö½ÚΪµ¥Î»£¬²ÎÊýֵΪ"bytes"£»
¶ÔÓÚǧ×Ö½ÚºÍÕ××Ö½Ú¿ÉÒÔʹÓÃËoдÐÎʽ¡£Í¬Ñu£¬sizefmt²ÎÊý±ØÐe*ÅÔÚfsizeÃuÁiµÄÇ°Ãae²ÅÄÜʹÓá£

2¡¢Include ÃuÁi
Include ÃuÁi¿ÉÒÔ°ÑÆaËuÎĵµÖеÄÎÄ×Ö»oͼƬ²aÈeµ½µ±Ç°±»½aÎoµÄÎĵµÖУ¬ÕaÊÇÕu¸oSSIµÄ¹Ø¼uËuÔÚ¡£Í¨¹ý
IncludeÃuÁiÖ»ÐeÒª¸Ä¶¯Ò»¸oÎļþ¾Í¿ÉÒÔ˲¼a¸uÐÂÕu¸oÕ¾µa£¡
Include ÃuÁi¾ßÓÐÁ½¸o²»Í¬µÄ²ÎÊý£º
Virtual£º¸ø³oµ½þÎñÆ÷¶Ëij¸oÎĵµµÄÐeÄa¾¶¡£
File£º¸ø³oµ½µ±Ç°Ä¿Â¼µÄÏa¶Ô¾¶£¬ÆaÖв»ÄÜʹÓÃ"../"£¬Ò²²»ÄÜʹÓþø¶Ô¾¶¡£

Õa¾ÍÒªÇoÿһ¸oĿ¼Öж¼°uº¬Ò»¸oheader.htmlÎļþ¡£

3¡¢Echo ÃuÁi
Echo ÃuÁi¿ÉÒÔÏÔʾÒÔϸ÷»¾³±aÁ¿£º
DOCUMENT_NAME£ºÏÔʾµ±Ç°ÎĵµµÄÃu³Æ¡£
DOCUMENT_URI£ºÏÔʾµ±Ç°ÎĵµµÄÐeÄaÂ
¾¶¡£ÀýÈ磺

Ëae×ÅÍøÕ¾µÄ²»¶Ï¢Õ¹£¬ÄÇÐ(C)Ô½À´Ô½³¤µÄURLµØֿ϶¨»aÈÃÈËÍÌÛ¡£Èç¹uʹÓÃSSI£¬Ò»ÇоͻaÓ­Èжø½a¡£ÒoΪÎÒ
ÃÇ¿ÉÒÔ°ÑÍøÕ¾µÄÓoÃuºÍSSIÃuÁi½aºÏÔÚÒ»ÆðÏÔʾÍeÕuµÄURL£¬¼´£º
http://YourDomain
QUERY_STRING_UNESCAPED£ºÏÔʾδ¾­×ªÒa´¦ÀiµÄÓÉ¿Í»§¶Ë
¢Ë͵IJeѯ×Ö´®£¬ÆaÖÐËuÓеÄÌØÊa×ÖuÇ°Ãae¶¼ÓÐת
Òa
u"\"¡£ÀýÈ磺

DATE_LOCAL£ºÏÔʾ*þÎñÆ÷Ée¶¨Ê±ÇøµÄÈÕÆÚºÍʱ¼a¡£Óû§¿ÉÒÔ½aºÏconfigÃuÁiµÄtimefmt²ÎÊý£¬¶¨ÖÆÊa³oÐÅÏ¢
¡£ÀýÈ磺

ÏÔʾ½a¹uΪ£º
Saturday£¬ the 15 of April£¬ in the year 2000
DATE_GMT£º¹¦ÄÜÓeDATE_LOCALÒ»Ñu£¬Ö»²»¹ý*µ»ØµÄÊÇÒÔ¸ñÁÖÄaÖαe׼ʱ¼aΪ»u×¼µÄÈÕÆÚ¡£ÀýÈ磺

LAST_MODIFIED£ºÏÔʾµ±Ç°ÎĵµµÄ×iºo¸uÐÂʱ¼a¡£Í¬Ñu£¬ÕaÊÇSSIÖÐ*dz£ÊµÓõÄÒ»¸o¹¦ÄÜ£¬Ö»ÒªÔÚHTMLÎĵµÖÐ
¼ÓÈeÒÔÏÂÕaÐмoµ¥µÄÎÄ×Ö£¬¾Í¿ÉÒÔÔÚÒ³ÃaeÉ϶¯Ì¬µÄÏÔʾ¸uÐÂʱ¼a¡£

CGI»¾³±aÁ¿
³ýÁËSSI»
¾³±aÁ¿Ö®Ía£¬echoÃuÁi»¹¿ÉÒÔÏÔʾÒÔÏÂCGI»¾³±aÁ¿£º
SERVER_SOFTWARE£ºÏÔʾ
þÎñÆ÷Èi¼þµÄÃu³ÆºÍ°ae±¾¡£ÀýÈ磺

SERVER_NAME£º ÏÔʾþÎñÆ÷µÄÖ÷»uÃu³Æ£¬DNS±ðÃu»oIPµØÖ¡£ÀýÈ磺

SERVER_PROTOCOL£ºÏÔʾ¿Í»§¶ËÇeÇoËuʹÓõÄЭÒeÃu³ÆºÍ°ae±¾£¬ÈçHTTP/1.0¡£ÀýÈ磺

SERVER_PORT£ºÏÔʾ*þÎñÆ÷µÄÏiÓ¦¶Ë¿Ú¡£ÀýÈ磺

REQUEST_METHOD£ºÏÔʾ¿Í»§¶ËµÄÎĵµÇeÇo½¨£¬°uÀ¨GET£¬ HEAD£¬ºÍPOST¡£ÀýÈ磺

REMOTE_HOST£ºÏÔʾ*¢³oÇeÇoÐÅÏ¢µÄ¿Í»§¶ËÖ÷»uÃu³Æ¡£

REMOTE_ADDR£ºÏÔʾ¢³oÇeÇoÐÅÏ¢µÄ¿Í»§¶ËIPµØÖ¡£

AUTH_TYPE£ºÏÔʾÓû§ÉiݵÄÑeÖ¤½*¨¡£

REMOTE_USER£ºÏÔʾ*ÃÎÊÊܱ£»¤Ò³ÃaeµÄÓû§ËuʹÓõÄÕʺÅÃu³Æ¡£

4¡¢Fsize£ºÏÔʾָ¶¨ÎļþµÄ´oС£¬¿ÉÒÔ½aºÏconfigÃuÁiµÄsizefmt²ÎÊý¶¨ÖÆÊa³o¸ñʽ¡£

5¡¢Flastmod£ºÏÔʾָ¶¨ÎļþµÄ×iºoÐÞ¸ÄÈÕÆÚ£¬¿ÉÒÔ½aºÏconfig ÃuÁiµÄtimefmt²ÎÊý¿ØÖÆÊa³o¸ñʽ¡£

ÕaÀi£¬ÎÒÃÇ¿ÉÒÔÀuÓÃflastmod²ÎÊýÏÔʾ³oÒ»¸oÒ³ÃaeÉÏËuÓÐÁ´½ÓÒ³ÃaeµÄ¸uÐÂÈÕÆÚ¡£½¨ÈçÏ£º

File

Another File

ÏÔʾ½a¹uΪ£º
File April 19£¬ 2000
Another File January 08£¬ 2000
6¡¢Exec
ExecÃuÁi¿ÉÒÔÖ´ÐÐCGI½Å±¾»oÕßshellÃuÁi¡£Ê¹Óý¨ÈçÏ£º
Cmd£ºÊ¹ÓÃ/bin/shÖ´ÐÐÖ¸¶¨µÄ×Ö´®¡£Èç¹uSSIʹÓÃÁËIncludesNOEXECÑ¡Ïi£¬Ôo¸ÃÃuÁi½«±»ÆÁ±Î¡£
Cgi£º¿ÉÒÔÓÃÀ´Ö´ÐÐCGI½Å±¾¡£ÀýÈ磬ÏÂÃaeÕa¸oÀý×ÓÖÐʹÓÃþÎñ¶Ëcgi-binĿ¼ÏµÄcounter.pl½Å±¾³ÌÐoÔÚÿ
¸oÒ³Ãae
ÅÖÃÒ»¸o¼ÆÊýÆ÷£º

 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例