• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
PHP开发记录
PHP以及web前端(ajax,js,jquery等)
博客园 首页 新随笔 管理
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 83 下一页

2009年10月21日

PHP长文章分页函数,带使用方法,不会分割段落,翻页在底部
摘要: <?php function ff_page($content,$page) { global $expert_id; $PageLength = 2000; //每页字数 $CLength = strlen($content); $PageCount = floor(($CLength / $PageLength)) + 1; //计算页数 $PageArray=array(); $Sep... 阅读全文
posted @ 2009-10-21 22:44 corange 阅读(309) 评论(0) 推荐(0)
 
表格隔行换色+鼠标点击变色 JS版,IE7,FF,OPERQ测试通过
摘要: meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <meta http-equiv="Content-Language" content="zh-CN" /> <meta content="all" name="robots" /> <meta name="author" content="盛飞, SenFe" 阅读全文
posted @ 2009-10-21 22:24 corange 阅读(121) 评论(0) 推荐(0)
 
PHP下ereg实现匹配ip的正则
摘要: $ip = "1.1.1.255".chr(0)."haha"; if(ereg("^[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}$",$ip)) { echo $ip; } else { echo "unknown"; } 这个ereg正则限制了$ip的数据为xxx.xxx.xxx.xxx这样的形式,表面上看上面的代码应该输出"unknown",而实际却输出了"1.1.1.255haha",因为ereg函数存在NULL截断漏洞 阅读全文
posted @ 2009-10-21 22:21 corange 阅读(214) 评论(0) 推荐(0)
 
 

2009年10月19日

asp常用的正则表达式实现字符串的替换
摘要: asp常用的正则表达式实现字符串的替换,主要包括去除html标签,去除class标签和去除script标签等 去除html标签正则<//*[^<>]*> Function LoseHtml(ContentStr) Dim ClsTempLoseStr,RegEx ClsTempLoseStr = Cstr(ContentStr) Set RegEx = New RegExp RegEx.Pattern = "<//*[^<>]*>" RegEx.IgnoreCase = True RegEx.Global = True Cls 阅读全文
posted @ 2009-10-19 16:46 corange 阅读(420) 评论(0) 推荐(0)
 
asp去除html标记与空格的正则
摘要: 用asp实现的去除内容的html标记和空格的实现代码 function nohtml(str) dim re Set re=new RegExp re.IgnoreCase =true re.Global=True re.Pattern="(/<.[^/<]*/>)" str=re.replace(str," ") re.Pattern="(/<//[^/<]*/>)" str=re.replace(str," ") str=replace(str," ",& 阅读全文
posted @ 2009-10-19 16:39 corange 阅读(161) 评论(0) 推荐(0)
 
 
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 83 下一页

公告


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3