dedecms虽然有诸多漏洞,但不可否认确实是一个很不错的内容管理系统(cms),其他也不乏很多功能实用性的函数,以下就部分列举,持续更新,不作过多说明.使用时需部分修改,你懂的 1.XSS过滤. function XSSClean($val) { global $cfg_soft_lang; if($cfg_soft_lang=='gb2312') gb2utf8($val); if (is_array($val)) { while (list($key) = each($val)) { if
XSS攻击在最近很是流行,往往在某段代码里一不小心就会被人放上XSS攻击的代码,看到国外有人写上了函数,咱也偷偷懒,悄悄的贴上来... 原文如下: The goal of this function is to be a generic function that can be used to parse almost any input and render it XSS safe. For more information on actual XSS attacks, check out h
Web标准化运动的口号——分离.分离.分离. 在2003年的 SXSW 会议中, Steve Champeon 和 Nick Finck 做了一个名为“面向未来的全方位 Web 设计”的演讲,揭示了这种 Web 开发新方法的蓝图. Steve 还给它取了个名称:渐进增强(Progressive Enhancement). 从内容花生开始,将其标记为富含语义的 (X)HTML,接着给内容裹上一层富含奶油的 CSS. 最后,添加 JavaScript 作为糖果硬壳,这就做成了一颗可口无比的美味(并使
using System; using System.Text.RegularExpressions; using System.Text; using System.IO; using System.Security.Cryptography; namespace Chen.Common { /// <summary> /// 数组拓展方法 /// </summary> public static class StringUtil { #region 拓展方法 #region 判