html标签的大小写转换? preg_match_all("/<(.*)>/iUs",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtolower($value),$html);} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 好没道理!<?phpfunction foo($t) { return strtoupper($t); return "<$t$s/$t>";}$text = <<< TEXT<a href=xxx>ppp</a><img src=xxx><font color=red>ppp</font>TEXT;echo preg_replace("/(<\w+)|(\/\w+>)/ie","foo('\\0')",$text);?> 我那个是行的,以下代码ZEND DEBUG通过<?phpob_start();?><html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8"><head><TITLE>Mybile Myself</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><META http-equiv="Content-Language" content="UTF-8" /></HEAD><BOdy><?phpecho "654565fdss反对撒";?></BODY></html><?php$html=ob_get_contents();preg_match_all("/<(.*)>/iUs",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtolower($value),$html);}ob_end_clean();echo $html;?> 恩,看错了...我以为你是要大写变为小写....改了一下测试代码:<?phpob_start();?><html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8"><head><TITLE>Mybile Myself</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><META http-equiv="Content-Language" content="UTF-8" /></HEAD><BOdy><?phpecho "654565fdss反对撒";?></BODY></html><?php$html=ob_get_contents();preg_match_all("/<(.*)>/iUs",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtoupper($value),$html);}ob_end_clean();echo $html;?>关键代码:preg_match_all("/<(.*)>/iUs",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtoupper($value),$html);} 我又改了一下....应该没什么问题了..<?phpob_start();?><html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8"><head><TITLE>Mybile Myself</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><META http-equiv="Content-Language" content="UTF-8" /></HEAD><BOdy><?phpecho "654565fdss反对撒";?><a href="sss"></a></BODY></html><?php$html=ob_get_contents();preg_match_all("/<([A-Z]*)( |>)|<\/([A-Z]*)>/iU",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtoupper($value),$html);}ob_end_clean();echo $html;?>关键代码preg_match_all("/<([A-Z]*)( |>)|<\/([A-Z]*)>/iU",$html,$matches);foreach ($matches[0] as $key => $value){ $html=str_replace($value,strtoupper($value),$html);} js如何取得ueditor里的值啊 OpenWindowAndSetValue与showModalDialog 有什么区别 qq好友的检索功能是怎么做的,有没有类似的文章。。 PHP 外部获取函数参数个数 请高手帮忙--在创建PHP扩展的时候如何使用loadlibrary!!! 如何用js控制html的输出,急啊~~~ win2003+php+sql2000这样的搭配怎么样? 一个欢迎你浮想联翩的问题,涉及知识管理系统;) 谁给介绍一个PHP做的网站(典型些、中文的)? 狂急!!!!我现在存储图片到数据库中不过超过1MB.请大家帮一帮助. 页面自动跳转问题! 关于手工发送POST请求的问题
function foo($t) {
return strtoupper($t);
return "<$t$s/$t>";
}
$text = <<< TEXT
<a href=xxx>ppp</a>
<img src=xxx>
<font color=red>ppp</font>
TEXT;
echo preg_replace("/(<\w+)|(\/\w+>)/ie","foo('\\0')",$text);
?>
ob_start();
?>
<html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8">
<head>
<TITLE>Mybile Myself</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META http-equiv="Content-Language" content="UTF-8" />
</HEAD>
<BOdy>
<?phpecho "654565fdss反对撒";
?>
</BODY>
</html>
<?php
$html=ob_get_contents();
preg_match_all("/<(.*)>/iUs",$html,$matches);
foreach ($matches[0] as $key => $value)
{
$html=str_replace($value,strtolower($value),$html);
}
ob_end_clean();
echo $html;
?>
测试代码:
<?php
ob_start();
?>
<html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8">
<head>
<TITLE>Mybile Myself</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META http-equiv="Content-Language" content="UTF-8" />
</HEAD>
<BOdy>
<?phpecho "654565fdss反对撒";
?>
</BODY>
</html>
<?php
$html=ob_get_contents();
preg_match_all("/<(.*)>/iUs",$html,$matches);
foreach ($matches[0] as $key => $value)
{
$html=str_replace($value,strtoupper($value),$html);
}
ob_end_clean();
echo $html;
?>关键代码:
preg_match_all("/<(.*)>/iUs",$html,$matches);
foreach ($matches[0] as $key => $value)
{
$html=str_replace($value,strtoupper($value),$html);
}
ob_start();
?>
<html XMLNS="http://www.w3.org/1999/xhtml" lang="UTF-8">
<head>
<TITLE>Mybile Myself</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META http-equiv="Content-Language" content="UTF-8" />
</HEAD>
<BOdy>
<?phpecho "654565fdss反对撒";
?>
<a href="sss"></a>
</BODY>
</html>
<?php
$html=ob_get_contents();
preg_match_all("/<([A-Z]*)( |>)|<\/([A-Z]*)>/iU",$html,$matches);
foreach ($matches[0] as $key => $value)
{
$html=str_replace($value,strtoupper($value),$html);
}
ob_end_clean();
echo $html;
?>
关键代码preg_match_all("/<([A-Z]*)( |>)|<\/([A-Z]*)>/iU",$html,$matches);
foreach ($matches[0] as $key => $value)
{
$html=str_replace($value,strtoupper($value),$html);
}