会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
JasonBao
博客园
首页
新随笔
联系
订阅
管理
2014年5月2日
网站 tag 伪静态化
摘要: www.abc.com/tag-xxx.html增加伪静态规则RewriteCond %{QUERY_STRING} ^(.*)$ RewriteRule ^tag-(.+)\.html$ /home/index/tag/?&tag=$1&%1
阅读全文
posted @ 2014-05-02 17:01 JasonBao
阅读(141)
评论(0)
推荐(0)
2014年2月28日
Php 判断数组开头和结尾
摘要: $list = array('a','b','c','d');foreach ($list as $key => $value) { if($key == 0){ print_r('第一个'); } if($key == count($list)-1){ print_r('最后一个'); }}不知道效率如何? 留存$list = array('a', 'b', 'c','d');foreach($list as $k=>$v
阅读全文
posted @ 2014-02-28 17:48 JasonBao
阅读(522)
评论(0)
推荐(0)
2014年1月1日
php汉字转拼音 字库型
摘要: /* *函数说名 $str 传入汉字 * $charset 编码 * $ishead 返回首字母 */function GetPinyin($str,$charset="utf-8",$ishead = 0) { $restr = ''; $str = trim($str); if($charset=="utf-8"){ $str=iconv("utf-8","gb2312",$str); } $slen = strlen($str); $pinyins=array(); if ($slen 0x8
阅读全文
posted @ 2014-01-01 23:13 JasonBao
阅读(328)
评论(0)
推荐(0)
Thinkphp 格式化打印测试函数
摘要: 1 function p($array){2 dump($array,1,'',0);3 die();4 }
阅读全文
posted @ 2014-01-01 23:12 JasonBao
阅读(236)
评论(0)
推荐(0)
curl post 函数
摘要: 1 function curl_post($url,$post_data){ 2 if(empty($url) || !is_array($post_data)){ 3 return false; 4 } 5 $ch = curl_init(); 6 curl_setopt($ch, CURLOPT_POST, 1); 7 curl_setopt($ch, CURLOPT_URL,$url); 8 curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data); 9 ob_start(...
阅读全文
posted @ 2014-01-01 23:07 JasonBao
阅读(265)
评论(0)
推荐(0)
公告