Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÓÃapache 2µÄmod_ext_filter¸øhtmlÎļþ¼Ó¹ã¸æ¡£

ÓÃapache 2µÄmod_ext_filter¸øhtmlÎļþ¼Ó¹ã¸æ¡£
ÏëÔÚ¾²Ì¬Ò³ÃæÉÏ×Ô¶¯¼Ó¸ö¹ã¸æÌõ£¬¶ø²»±ØÊÖ¶¯ÐÞ¸Äÿ¸ö¾²Ì¬Ò³Ãæ¡£
°´ÕÕÕâ¸öÐèÇóÔÚgoogleÉÏÕÒÁËÒ»¶Îʱºò£¬²»µÃÒªÁì¡£
ºóÀ´ÏëÆðÀ´tomcatÀïÓÐfilterµÄ¸ÅÄîµÄ¡£
¾Íµ½apacheµÄÎĵµÀïÕÒ¡£
ϹèÅöµ½ÁËÕâ¸öËÀºÄ×Ó¡£
http://httpd.apache.org/docs/2.0/mod/mod_ext_filter.html
ÓÉÓÚ×Ô¼ºÑ§Ï°²»ÈÏÕ棬²¢ÇÒ±à³ÌÄÜÁ¦²»Ç¿£¬±¿×¾µÄ°´ÕÕÎĵµ½â¾öÁËÕâ¸öÎÊÌâ¡£
¸öÈ˸оõ¾ÍÊÇunix¹ÜµÀµÄÀíÄî¡£
·þÎñÆ÷»·¾³ÊÇcentos 4.2 /apache 2.0.52
Ê×ÏȼÓÔØmod_ext_filter
ÔÚ/etc/httpd/conf/httpd.conf
µÄDynamic Shared Object (DSO) Support½Ú
¼ÓÈë
Code:
LoadModule ext_filter_module modules/mod_ext_filter.so
È»ºó¶¨ÒåfilterµÄÃû×Ö£¨advtext£©ºÍÅäÖÃfilterÒªµ÷ÓóÌÐòµÄÃû×Ö£¨gingeradv£©¡£
Code:
ExtFilterDefine advtext mode=output intype=text/html cmd="/usr/bin/gingeradv"
ÔÚDirectory±êÇ©Àï¼ÓÈëÈçÏÂÐС£
Code:
SetOutputFilter advtext
¼ÓÈëºó¿´ÆðÀ´ÈçÏÂ
Code:
<Directory />
   Options FollowSymLinks
   AllowOverride None
   SetOutputFilter fixtext
</Directory>
ÓÃÓÚ¼ÓÈë¹ã¸æµÄ³ÌÐògingeradvÊÇÓÃperlдµÄ£¬×Ô¼º±¿Ð´µÄºÜÀ¬»ø¡£
Code:
#!/usr/bin/perl
my @lines = <STDIN>;
open ADVLINE, "/var/www/html/abc.txt" or die "cant't find the adv files";
my @advlines = <ADVLINE>;
print @lines,@advlines;
¼ÇµÃÒª¸øÕâ¸öÎļþÖ´ÐеÄȨÏÞ¡£
Code:
chmod a+x gingeradv
ÒªÏÔʾµÄ¹ã¸æ±£´æÔÚ/var/www/html/abc.txtÀï¡£
ÎÒÓÃÓÚ²âÊÔµÄÕâ¸öÊÇÒ»¸ögoogleµÄGoogle AdSense
abc.txtÈçÏÂ
Code:
<script type="text/j avascript"><!--
google_ad_client = "pub-5617089787488679";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "text_image";
google_ad_channel ="";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/j avascript"
 src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
È»ºóÖØÐÂÆô¶¯apache·þÎñÆ÷
Code:
apachectl graceful


Ïà¹ØÎĵµ£º

Struts HTML񈬀

1 <html:html>񈬀
    ¼òµ¥µÄÔÚÒ³ÃæµÄ¿ªÊ¼ºÍ½áβ´¦²úÉúÒ»¸öhtml±ê¼Ç¡£
2<html:base> 
 ÓÃÓÚÔÚÍøÒ³µÄhead²¿·ÖÉú³ÉÒ»¸öbase±ê¼Ç£¬×÷Óò»½ö½öÊÇÉú³É±¾ÍøÒ³µÄURL £¬¸üÖØÒªµÄÊÇΪ¸ÃÒ³ÃæµÄËùÓÐÆäËûµÄÁ´½ÓÌṩÏà¶ÔµÄλÖá£
3 <html:link>
   ÓÃÓÚÉú³ÉhtmlÖеÄ<a> ......

HTML DOMÓëXML DOMÖ®¼äµÄÇø±ðÓëÁªÏµ

ÏñÔÚ×ùµÄ¸÷λһÑù£¬ÓÉÓÚ×ÔÉíµÄÐËȤ£¬ÎÒ¶ÔAJAX±à³Ì·½ÃæµÄÑо¿ÊdzÖÐø²»¶ÏµÄ¡£ËæןÃÁìÓòµÄÉîÈ룬ÎÒÔ½À´Ô½·¢¾õËùνµÄä¯ÀÀÆ÷DOM£¬¼´HTML DOM£¬ÊÇÒ»¸ö·Ç³£ÖµµÃ¹Ø×¢µÄµã¡£Õâ¹ÛµãÔÚÓëͬÐÐÃǽ»»»Òâ¼ûµÄʱºòÒ²Ôø̸µ½¹ý£¬¾ÍÊÇ£¬ÎÒÃÇÈÔȻȱ·¦¾ßÓÐÉî¶ÈµÄ¡¢¹æ·¶µÄDOM Level 1¸¨Öú¶ÁÎÍøÂçÉÏËÑË÷Ò²±È½ÏÉÙ¼û¡£¶øÎÒÃÇÕæʵµÄÏë·¨ÔÚÓÚ£¬ÎÒÃÇ ......

HTML語·¨×Öµä

 
語·¨
說Ã÷
<! - - ... - ->
ÓÃì¶HTMLÎļþÖеÄ註½â
<A HREF TARGET=>
Ö¸¶¨³¬鏈結µÄ·Ö¸î視´°Ä¿標
<A HREF=#錨µÄÃû稱>
設¶¨鏈結錨點µÄÃû稱
<A HREF=>
設¶¨³¬鏈 ......

±ê×¼HTMLÒ³ÃæÔªËØMETA

1.¶¨ÒåÓïÑÔ   
    
  ¡¡¡¡¸ñʽ£º   
    
  ¡¡¡¡¡´meta   http£­equiv=″Content£­Type″   content=″text/html;   charset=gb2312″¡µ   
    
  ¡¡¡¡ÕâÊÇMETA×î³£¼ûµÄÓ÷¨,ÔÚÖÆ× ......

ÈçºÎÔÚhtmlÒ³ÃæÖÐʹÓÿò¼Ü

<html>
<frameset rows="50%,50%">
<frame src="/example/html/frame_a.html">
<frameset cols="25%,75%">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
</frameset>
</frameset>
</html> ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ