主要测试下网站功能。
第一段插入代码测试。
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>织梦技术论坛出品</title> <style> html{background:#f4f5f5} </style> </head> <body> <div id="box"> <p>即将离开本网站,请注意账号财产安全</p> <p>http://nidecms.com/</p> <p><a id="UrlId" href="http://nidecms.com/" rel="nofollow">继续访问</a></p> <button><a id="close" onclick="closePage()">关闭页面</a></button> </div> <script type="text/javascript"> var url = document.location.toString(); console.log(url); //window.close(); 关闭当前浏览器窗口 </script> </body> </html>
第二段测试正则表达式。
{dede:field.body runphp=yes} global $cfg_basehost,$cfg_medias_dir; $str = @me; $search = '/(<img.*?)width=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search1 = '/(<img.*?)height=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search2 = '#(<img.*?style=".*?)width:\s{0,}\d+px;([^"]*?.*?>)#i'; $search3 = '#(<img.*?style=".*?)height:\s{0,}\d+px;([^"]*?.*?>)#i'; $content = preg_replace($search,'$1$3',$str); $content = preg_replace($search1,'$1$3',$content); $content = preg_replace($search2,'$1$2',$content); $content = preg_replace($search3,'$1$2',$content); @me = str_replace($cfg_medias_dir.'/', $cfg_basehost.$cfg_medias_dir.'/', $content); {/dede:field.body}
第三段测试正则表达式。
{dede:field.content runphp=yes} global $cfg_basehost,$cfg_medias_dir; $str = @me; $search = '/(<img.*?)width=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search1 = '/(<img.*?)height=(["\'])?.*?(?(2)\2|\s)([^>]+>)/is'; $search2 = '#(<img.*?style=".*?)width:\s{0,}\d+px;([^"]*?.*?>)#i'; $search3 = '#(<img.*?style=".*?)height:\s{0,}\d+px;([^"]*?.*?>)#i'; $content = preg_replace($search,'$1$3',$str); $content = preg_replace($search1,'$1$3',$content); $content = preg_replace($search2,'$1$2',$content); $content = preg_replace($search3,'$1$2',$content); @me = str_replace($cfg_medias_dir.'/', $cfg_basehost.$cfg_medias_dir.'/', $content); {/dede:field.content}
第四段测试登录后查看。
第五段测试登录后查看。
第六段测试插入表情。
好了,已了解,不需要测试了。
+31 31 个回复 | 最后更新于 2025-01-16
登录后方可回帖