£Ó£Ó£É

£±¡¥£Ó£Ó£É¤Ã¤Æ¤É¤ó¤Ê¤â¤Î¡©

¡¡SSI¤È¤Ï¥µ¡¼¥Ð¡¼¡¦¥µ¥¤¥É¡¦¥¤¥ó¥¯¥ë¡¼¥É(Server Side Include)¤Îά¤Ç¤¹¡£ NCSA¤¬ºÇ½é¤Ë³«È¯¤·¤¿µ¡Ç½¤é¤·¤¤¤Ç¤¹¡£WWW¥µ¡¼¥Ð¾å¤ÎHTML¥Õ¥¡¥¤¥ë¤¬¡¢HTTP¥¯¥é¥¤¥¢¥ó¥È¤ËÁ÷¿®¤µ¤ì¤ëÁ°¤Ë¡¢HTML¥Õ¥¡¥¤¥ëÃæ¤Ëµ­½Ò¤µ¤ì¤¿·Á¼°¤Ë¤·¤¿¤¬¤Ã¤Æ¡¢´Ä¶­ÊÑ¿ô¤ÎÃͤ䡢¥¹¥¯¥ê¥×¥ÈÅù¤Î¼Â¹Ô·ë²Ì¤ä¡¢Â¾¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤò´Þ¤Þ¤»(Include¤µ¤»)¤Æ¤«¤éÁ÷¿®¤¹¤ë¡¢¤È¤¤¤¦µ¡Ç½¤Ç¤¹¡£


£²¡¥£Ã£Ç£É¤È¤Î°ã¤¤

¡¡CGI¤Ï¡¢HTML¤Ê¤ê¡¢¥¤¥á¡¼¥¸¥Ç¡¼¥¿¤Ê¤ê¤òContent-type¥Ø¥Ã¥À¤Ë³¤±¤ÆÅǤ­½Ð¤·¤Þ¤¹¡£HTMLÃæ¤Ë¥¤¥á¡¼¥¸¥Ç¡¼¥¿Åù¤¬CGI¤Î½ÐÎÏ·ë²Ì¤È¤·¤ÆŽ¤ê¤Ä¤±¤Æ¤¢¤ë¤È¡¢¥¯¥é¥¤¥¢¥ó¥È¤ËHTML¥Õ¥¡¥¤¥ë¤¬¥À¥¦¥ó¥í¡¼¥É¤µ¤ì¤Æ¤«¤é¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬¤½¤ÎCGI¤ËÍ×µá¤ò¤À¤·¤Þ¤¹¡£·ë²Ì¤È¤·¤Æ½ÐÎϤµ¤ì¤¿¥Ç¡¼¥¿¤ò¥¯¥é¥¤¥¢¥ó¥È¤¬½èÍý¤¹¤ë¤ï¤±¤Ç¤¹¡£
¡¡¤¬¡¢SSI¤Î½ÐÎÏ·ë²Ì¤Ï¡¢¥µ¡¼¥Ð¡¼¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤·¤â¤È¤ÎHTML¥Õ¥¡¥¤¥ë¤Ë¼è¤ê¹þ¤Þ¤ì¤Þ¤¹¡£¥¯¥é¥¤¥¢¥ó¥È¤«¤é¸«¤ë¤È¡¢¤¿¤À¤ÎHTML¤È¤·¤Æ¤·¤«¸«¤¨¤Þ¤»¤ó¡£


£³¡¥£Ó£Ó£É¤Î·Á¼°

¡¡·Á¼°¤Ï²¼¤ÎÄ̤ê¤Ç¤¹¡£¥³¥á¥ó¥È¥¨¥¹¥±¡¼¥×¤Çµ­½Ò¤·¤Þ¤¹¡£
<!--#¥³¥Þ¥ó¥É ¥¿¥°1="ÃÍ1" ¥¿¥°2="ÃÍ2" -->
¡¡"-"¤È"#"¤Î´Ö¤Ë¥¹¥Ú¡¼¥¹¤¬¤¢¤Ã¤¿¤ê¤¹¤ë¤È¡¢¥³¥á¥ó¥È¤Èǧ¼±¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹¡£

¡¡²¼¤Îɽ¤Ë¥³¥Þ¥ó¥É¡¿¥¿¥°¤Î°ìÍ÷¤ò¼¨¤·¤Þ¤¹¡£

¥³¥Þ¥ó¥É¥³¥Þ¥ó¥ÉÀâÌÀ
¥¿¥°ÀâÌÀ¥¿¥°Ì¾»ØÄêÆâÍÆ
configSSI¤Î´Ä¶­¤òÀßÄꤹ¤ë¡£
¥¿¥°ÀâÌÀerrormsg¥¨¥é¡¼È¯À¸»þ¤Ë¥¯¥é¥¤¥¢¥ó¥È¤Ë¥¨¥é¡¼¤òÊÖ¤¹Ê¸»úÎó¤ò»ØÄꤹ¤ë¡£
timefmtÆüÉÕ»þ¹ïɽ¼¨¤Î·Á¼°¤ò»ØÄꤹ¤ë¡£UNIX¤Îstrftime()¤È¸ß´¹À­¤¬¤¢¤ë¡£
sizefmt¥µ¥¤¥ºÉ½¼¨¤Î·Á¼°¤ò»ØÄꤹ¤ë¡£
include¾¤Î¥É¥­¥å¥á¥ó¥È¥Õ¥¡¥¤¥ë¤ÎÆâÍƤò¼è¤ê¹þ¤à¡£
¥¿¥°ÀâÌÀvirtual²¾Áۥѥ¹¡Ê¥µ¡¼¥Ð¤ÎDOCUMENT_ROOT¤«¤é¤Î¥Ñ¥¹¡Ë¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
file¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î¥Ñ¥¹¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£"./"¤ä"../"¤Ê¤É¤Ï»ÈÍÑÉԲġ£
echo´Ä¶­ÊÑ¿ô¤ÎÆâÍƤò¼è¤ê¹þ¤à¡£
¥¿¥°ÀâÌÀvarɽ¼¨¤¹¤ë´Ä¶­ÊÑ¿ô̾¤ò»ØÄꤹ¤ë¡£
flastmod¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¹¹¿·Æü»þ¤òɽ¼¨¤¹¤ë¡£
¥¿¥°ÀâÌÀvirtual²¾Áۥѥ¹¡Ê¥µ¡¼¥Ð¤ÎDOCUMENT_ROOT¤«¤é¤Î¥Ñ¥¹¡Ë¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
file¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î¥Ñ¥¹¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£"./"¤ä"../"¤Ê¤É¤Ï»ÈÍÑÉԲġ£
fsize¥Õ¥¡¥¤¥ë¤Î¥µ¥¤¥º¤òɽ¼¨¤¹¤ë¡£
¥¿¥°ÀâÌÀvirtual²¾Áۥѥ¹¡Ê¥µ¡¼¥Ð¤ÎDOCUMENT_ROOT¤«¤é¤Î¥Ñ¥¹¡Ë¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
file¥«¥ì¥ó¥È¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î¥Ñ¥¹¤Ç¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£"./"¤ä"../"¤Ê¤É¤Ï»ÈÍÑÉԲġ£
exec¥·¥§¥ë¥³¥Þ¥ó¥É¤Þ¤¿¤ÏCGI¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¡¢¤½¤Î½ÐÎÏ·ë²Ì¤ò¼è¤ê¹þ¤à¡£
¥¿¥°ÀâÌÀcmd¼Â¹Ô¤¹¤ë¥·¥§¥ë¥³¥Þ¥ó¥É¤ò»ØÄꤹ¤ë¡£
file¼Â¹Ô¤¹¤ëCGI¥×¥í¥°¥é¥à¤ò»ØÄꤹ¤ë¡£


£´¡¥£Ó£Ó£É´Ä¶­ÊÑ¿ô

¡¡SSI¤Ç¤Ï°Ê²¼¤Î´Ä¶­ÊÑ¿ô¤¬»ÈÍѲÄǽ¤Ç¤¹¡£

´Ä¶­ÊÑ¿ô°ÕÌ£echo¥³¥Þ¥ó¥É¤Ë¤è¤ëɽ¼¨Îã
DOCUMENT_NAME¸½ºß¤Î¥Õ¥¡¥¤¥ë̾
DOCUMENT_URI¸½ºß¤Î¥Õ¥¡¥¤¥ë¤Î²¾Áۥѥ¹¡Ê¥µ¡¼¥Ð¤ÎDOCUMENT_ROOT¤«¤é¤Î¥Ñ¥¹¡Ë
QUERY_STRING_UNESCAPED¥Ç¥³¡¼¥É¤Ç¤­¤Ê¤¤Ê¸»úÎó
DATE_LOCAL ¥í¡¼¥«¥ë¥¿¥¤¥à¥¾¡¼¥ó¤ÎÆü»þ
DATE_GMTGMT¤ÎÆü»þ
LAST_MODIFIED¸½ºß¤Î¥Õ¥¡¥¤¥ë¤ÎºÇ½ª¹¹¿·Æü»þ


£µ¡¥£È£Ô£Ô£Ð´Ä¶­ÊÑ¿ô

¡¡¤ª¤Þ¤±¤È¤·¤Æ¡¢HTTP´Ä¶­ÊÑ¿ô¤âºÜ¤Ã¤±¤Æ¤ª¤­¤Þ¤¹¡£

´Ä¶­ÊÑ¿ô°ÕÌ£echo¥³¥Þ¥ó¥É¤Ë¤è¤ëɽ¼¨Îã
SERVER_SOFTWAREWWW¥µ¡¼¥Ð¤Î¥½¥Õ¥È¥¦¥§¥¢Ì¾
SERVER_NAMEWWW¥µ¡¼¥Ð¤ÎIP/¥Û¥¹¥È̾
GATEWAY_INTERFACEWWW¥µ¡¼¥Ð¤ÎCGI¥Ð¡¼¥¸¥ç¥ó
SERVER_PROTOCOLHTTP¥×¥í¥È¥³¥ë¤Î¥Ð¡¼¥¸¥ç¥ó
SERVER_PORTWWW¥µ¡¼¥Ð¤ÎHTTP¥Ý¡¼¥ÈÈÖ¹æ
REQUEST_METHOD¥¯¥é¥¤¥¢¥ó¥È¤ÎÍ×µá¥á¥½¥Ã¥É
PATH_INFOCGI¤ËÅϤ¹¥Ñ¥¹¾ðÊó
PATH_TRANSLATEDPATH_INFO¤ÎURLÉô¤Ë°ìÃפ¹¤ë¥·¥¹¥Æ¥à¥Õ¥ë¥Ñ¥¹
SCRIPT_NAMECGI¥¹¥¯¥ê¥×¥È¤Î¥Ñ¥¹Ì¾(URL·Á¼°)
QUERY_STRINGCGI¤¬GET¥á¥½¥Ã¥É·Á¼°¤Ç¼Â¹Ô¤µ¤ì¤¿¾ì¹ç¤Î°ú¿ô("?"¥Þ¡¼¥¯°Ê²¼Á´¤Æ)
REMOTE_HOST¥¯¥é¥¤¥¢¥ó¥È¥Û¥¹¥È̾
REMOTE_ADDR¥¯¥é¥¤¥¢¥ó¥ÈIP¥¢¥É¥ì¥¹
AUTH_TYPEǧ¾ÚÊý¼°¥×¥í¥È¥³¥ë̾
REMOTE_USERǧ¾Ú¥æ¡¼¥¶Ì¾
REMOTE_IDENTident¤ÎÊÖ¤¹ÃÍ
CONTENT_TYPE¥Ç¡¼¥¿¤Î·Á¼°
CONTENT_LENGTHCGI¤¬POST¥á¥½¥Ã¥É¤Ç¼Â¹Ô¤µ¤ì¤ë¤È¤­¤Îɸ½àÆþÎϥǡ¼¥¿Ä¹(¥Ð¥¤¥È)
HTTP_ACCEPTHTTP Accept¥Ø¥Ã¥À¤ÇÄêµÁ¤µ¤ì¤¿¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬µö¤·¤Æ¤¤¤ëContent-type¤Î¥ê¥¹¥È(Á´¤Æ:'*/*')
HTTP_USER_AGENT¥Ö¥é¥¦¥¶¤Î¾ðÊó
HTTP_REFERERľÁ°¤Ë»²¾È¤·¤Æ¤¤¤¿URL

Copyright (C) katsu. All Rights Reserved.