Apache :: Scristior.

Apache Çڵ鷯 ÄÁº£À̾î Áö¿ø
Áö±Ý ´Ù¿î·Îµå

Apache :: Scristior. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • Perl Artistic License
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Dmitry Koterov
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://en.dklab.ru/lib/JsHttpRequest/

Apache :: Scristior. ű×


Apache :: Scristior. ¼³¸í

Apache Çڵ鷯 ÄÁº£À̾î Áö¿ø Apache :: Scriptor´Â Perl ½ºÅ©¸³Æ®¸¦ ÅëÇØ ¸ðµç ¿äûÀ» ó¸®ÇÏ´Â µ¥ »ç¿ëµÇ´Â Perl ¸ðµâÀÔ´Ï´Ù. ÀÌ ½ºÅ©¸³Æ®´Â ÁöÁ¤µÈ ÆÄÀÏ Çü½Ä¿¡ ´ëÇÑ Çڵ鷯 ÄÁº£À̾ È£ÃâÇÏ´Â °ÍÀÔ´Ï´Ù. .htaccess ÆÄÀÏ¿¡ÀÖ´Â Áö½Ã¹®À» ¹èÄ¡ ÇÒ ¶§ : ¾×¼Ç S_COPYRIGHT "/_kernel/scriptor.pl"AddHandler S_Copyrighte .htmapache´Â .htm ¹®¼­¸¦ ó¸®Çϱâ À§ÇØ / _kernel / scriptor.pl Çڵ鷯¸¦ »ç¿ëÇؾßÇÕ´Ï´Ù. ±×·± ´ÙÀ½ Apache :: Scriptor°¡ ½ÃÀÛ µÇ°íÀÌ .htaccess¸¦ Àаí .htm ¹®¼­ÀÇ Çڵ鷯 À̸§À» ±â¾ïÇÕ´Ï´Ù. S_CopyrightÀÔ´Ï´Ù. Apache :: Scristicor´Â /_kernel/handlers/s_copyright.plÀ» °Ë»öÇÏ¿© µ¿ÀÏÇÑ À̸§ÀÇ ¼­ºê ·çƾÀ» ãÀ¸·Á°íÇÕ´Ï´Ù. s_copyright (). ±×·± ´ÙÀ½ ÀÌÀü Çڵ鷯¿¡¼­ ¸®ÅÏ µÈ ¹®¼­ º»¹®À» ù ¹ø° ¸Å°³ º¯¼ö·Î Àü´ÞÇÏ°í È®ÀåÀÚ .html È®ÀåÀÚ¸¦ À§ÇØ »õ ÄÁº£À̾ ½ÃÀÛÇÏ´Â °ÍÀº? ½±½À´Ï´Ù : action-addhandler ½ÖÀ» .htaccess ÆÄÀÏ¿¡ ¹èÄ¡ÇÕ´Ï´Ù. Scriptor Çڵ鷯 ÆÄÀÏ À̸§ (/ _kernel / Çڵ鷯¿¡ ¹èÄ¡ µÈ)¿¡ ÇØ´çÇÏ´Â ÀÌ·¯ÇÑ Çڵ鷯ÀÇ À̸§À» ¼±ÅÃÇؾßÇÕ´Ï´Ù. Apache´Â ÀÌ·¯ÇÑ À̸§À» °ÆÁ¤ÇÏÁö ¾ÊÁö¸¸ Apache :: Scristicor´Â ¾Ê½À´Ï´Ù. À§ÀÇ ¿¹¸¦ ÂüÁ¶ÇϽʽÿÀ (µÎ °³ÀÇ Çڵ鷯 : ³»Àå Perl ¹× »ç¿ëÀÚ Á¤ÀÇ S_Copyright)À» »ç¿ëÇÕ´Ï´Ù. ^ ### ¼­¹ö ±¸Á¶¸¦ °í·ÁÇϽʽÿÀ. ### / ### _kernel / ### Çڵ鷯 / ### s_copyright.pl # ## ... ### .htaccess ### scriptor.pl ### .htaccess ### test.htm ### file /.htaccess : # .htm ¿ë ÄÁº£ÀÌ¾î ¼³Á¤ : # "ÀÔ·Â"=> eperl => s_copyright => "Ãâ·Â"µ¿ÀÛ "/_kernel/scriptor.pl"/_kernel/scriptor.pl "AddHandler Perl /_kernel/scriptor.pl"AddHandler S_COPYRIGHT .HTM ### file /_kernel/.htaccess : # È°¼ºÈ­ È°¼ºÈ­ . Perl ½ÇÇà °¡´É ¿É¼Ç Advice addHandler CGI-Script. PL ### ÆÄÀÏ /_kernel/scriptor.pl : #! / usr / local / bin / perl -w findbin qw ($ bin); ³» $ handdir = "$ bin / handlers"; # ©£©£©£ ©£©£ ©£ # cgi-script°¡ ¾Æ´Ï¶ó´Â °ÍÀº ¾Æ´Õ´Ï´Ù. if (! $ env {document_root} ||! $ env {script_name} ||! $ env {server_name}) {print "ÀÌ ½ºÅ©¸³Æ®´Â Apache handler·Î¸¸ »ç¿ëÇؾßÇÕ´Ï´Ù! "; exit;} # ºñ ¾ÆÆÄÄ¡ Çڵ鷯 ½ÇÇà? (! $ env {redirect_url}) {print"À§Ä¡ : http ": // $ env {server_name} / ";}}} apache :: Scristor; ³» $ scr = apache :: str scr => new (); $ scr-> set_handlers_dir ($ handdir); # on! $ scr- > run_uri ($ env {request_uri}, $ env {path_translated}); ### file /_kernel/handlers/s_copyright.pl : sub s_copyright {my ($ input) = @ _; -f $ env {script_filename} ¶Ç´Â ¹Ýȯ -1; # ¿À·ù Ç¥½Ã±â # ¸ðµç Ãâ·Â Àü¿¡ ÁÖ¼® ¹®ÀÚ¿­À» Ãß°¡ÇÕ´Ï´Ù. Àμâ ' '. $ ÀÔ·Â; ¹Ýȯ 0; # ok} ### file / etest.htm : " hello, world! "; ### ´ÙÀ½, »ç¿ëÀÚ´Â http://ourhost.com/test.htm¿¡ ÀԷµ˴ϴÙ. ### °á°ú´Â ´ÙÀ½°ú °°½À´Ï´Ù : ÄÜÅÙÃ÷ Çü½Ä : ÅؽºÆ® / HTML ¾È³ç, ¼¼°è! ´ÙÀ½Àº "Apache :: Scriptor"ÀÇ ¸î °¡Áö ÁÖ¿ä ±â´ÉÀÌ ÀÖ½À´Ï´Ù. ¡¤ Perl ¹ÙÀ̳ʸ® ¸¸ »ç¿ëÇÕ´Ï´Ù. ¡¤ Apache Handler ÄÁº£À̾ ±¸¼ºÇÏ´Â µ¥ µµ¿òÀ̵˴ϴÙ. Áï, ÇÑ Ã³¸®±â¿¡¼­ ´Ù¸¥ 󸮱â·Î Ãâ·ÂÀ» ¸®µð·º¼Ç ÇÒ ¼ö ÀÖ½À´Ï´Ù. ¡¤ ºñ Á¸Àç URL ó¸® ¹× 404 ¿À·ù 󸮸¦ Áö¿øÇÕ´Ï´Ù. ¡¤ ±¸¼º ÇÒ .htaccess ÆÄÀÏÀ» »ç¿ëÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ Perl.


Apache :: Scristior. °ü·Ã ¼ÒÇÁÆ®¿þ¾î