phpÕýÔòȡǶÌ×html±êÇ©
<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="img1" id="img1" src=""/>
<div id=2><img name="img2" id="img2" src=""/>
<div id=3><img name="img3" id="img3" src=""/>
</div>
</div>
</div>
</div>
</body>
</html>
html;
$pattern = "/(".
"<\!\w+(?:\s+[^>]*?)+\s*>|".
"<\w+(?:\s+\w+(?:\s*=\s*(?:\"[^\"]*\"|'[^']*'|[^\"'>\s]+))?)*\s*\/?>|".
"<\/\w+\s*>|".
"<\!--[^-]*-->".
")/";
preg_match_all($pattern, $s, $aMatches, PREG_OFFSET_CAPTURE);
function getMatchTags($s, $arr) {
$sMatchClose = '';
$arrClose = array();
$arrReturn = array();
for($i=0; $i<count($arr); $i++) {
$iCount = 0;
if (preg_match("/<[^>\s*]*/", $arr[$i][0], $aMatchOpen)) {
$sMatchClose = '</' . substr($aMatchOpen[0], 1) . '>';
for($j=$i-1; $j<count($arr); $j++) {
if (!(stripos($arr[$j][0], $aMatchOpen[0]) === false)) {
$iCount ++;
$flag = 1;
}
if (!(stripos($arr[$j][0], $sMatchClose) === false)) {
$iCount --;
$flag = 1;
if($iCount == 0 && $flag == 1) {
$arrClose[] = $arr[$i];
$arrClose[] = $arr[$j];
}
}
}
}
}
$k=0;
for($i=0; $i<count($arrClose); $i+=2) {
$arrReturn[$k][0] = $arrClose[$i];
$arrReturn[$k][1] = $arrClose[$i+1];
Ïà¹ØÎĵµ£º
Output Control
º¯Êý¿ÉÒÔÈÃÄã×ÔÓÉ¿ØÖƽű¾ÖÐÊý¾ÝµÄÊä³ö¡£Ëü·Ç³£µØÓÐÓã¬ÌرðÊǶÔÓÚ£ºµ±ÄãÏëÔÚÊý¾ÝÒѾÊä³öºó£¬ÔÙÊä³öÎļþÍ·µÄÇé¿ö¡£Êä³ö¿ØÖƺ¯Êý²»¶ÔʹÓÃ
header()
»ò
setcookie(),
·¢Ë͵ÄÎļþÍ·ÐÅÏ¢²úÉúÓ°Ïì
,
Ö»¶ÔÄÇЩÀàËÆÓÚ
echo()
ºÍ
PHP
´úÂëµÄÊý¾Ý¿éÓÐ×÷Óá£
ÎÒÃÇÏȾÙÒ»¸ö¼òµ¥µÄÀý×Ó£¬Èôó¼Ò¶Ô ......
×î½üÐÂÂòÁ˸öµçÄÔ£¬ÏµÍ³ÊÇwindows7£¬window7ÔÚ½çÃ棬¹¦ÄÜ·½Ã涼ͦÈÃÈËÂúÒâµÄ£¬¸Ð¾õºÜˬ£¬²»Ë¬µÄÊÇÓÖÒªÖØа²×°»·¾³ÁË¡£
ËùÓÐÈí¼þ¾ù°²×°ÔÚF:\server\ÏÂ
apacheĿ¼£ºF:\server\apache2.2
phpĿ¼£ºF:\server\php
msyqlĿ¼£ºF:\server\mysql
Ò»¡¢°²×°apache
°²×°apacheµÄ°æ±¾ÊÇ£ºhttpd-2.2.15-win32-x86-no_ssl.msi
° ......
ÈçºÎÏòHTML 5¹ý¶É£¿
¡¡¡¡Web¿ª·¢ÉçÇøµÄ²»ÉÙÈËÈÏΪתÏòHTML 5Òª½÷É÷¡£±ÈÈ磬ËäȻ΢Èí¼Æ»®ÔÚIE9ÖÐÖ§³ÖHTML 5£¬µ«Õâ¼ÒÈí¼þÒµ¾Þ뢶ÔÓÚÔÚHTML 5»¹Ã»ÓÐÕýʽ³ÉΪ±ê׼֮ǰ֧³ÖËüÐÄ´æÒÉÂÇ¡£Î¢ÈíWindowsÊÂÒµ²¿×ܲÃSteven Sinofsky×î½ü½ÓÊܲɷÃʱ±íʾ£º“ÏÈ˵×Ô¼º»ùÓÚ±ê×¼£¬µ«ËæºóÓÖ˵ÄãÊÇ×î¼æÈÝHTML 5µÄä¯ÀÀÆ÷£¬ÕâÖÖ×ö·¨²»Ã÷ÖÇ£ ......
Struts -- html:link ±êÇ©µÄʹÓÃ
<html:link> ±êÇ©ÓÃÓÚÉú³ÉHTML <a> ÔªËØ¡£<html:link> ÔÚ´´½¨³¬Á´½Óʱ£¬ÓÐÁ½¸öÓŵ㣺
(1) ÔÊÐíÔÚURL ÖÐÒÔ¶àÖÖ·½Ê½°üº¬ÇëÇó²ÎÊý¡£
(2) µ±Óû§ä¯ÀÀÆ÷¹Ø±ÕCookie ʱ£¬»á×Ô¶¯ÖØдURL£¬°ÑSessionID ×÷ΪÇëÇó²ÎÊý°üº¬ÔÚURL ÖУ¬ÓÃÓÚ¸ú×ÙÓû§µÄSession ״̬¡£
< ......
»·¾³Èí¼þ°æ±¾½éÉÜ£º
APACHE 2.0.59
PHP5.2.3
MYSQL5.0.45
GD-2.0.35
Zend Optimizer v3.3.0
  ......