php
简言
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
去除指定的html标记
function _strip_tags($tagsArr,$str) { foreach ($tagsArr as $tag) { $p[]="/(.$tag."|".$tag.")[^>]*>)/i"; } $return_str = preg_replace($p,"",$str); retu转载 2014-02-18 14:59:50 · 469 阅读 · 0 评论 -
PHP读取XML
$con=file_get_contents("http://vol.stock.hexun.com/charts/Close/Share/Info_3.ashx?code=600111"); $xml = simplexml_load_string($con); foreach($xml->Item as $v){ $arr=(array)$v->attribute转载 2014-02-18 15:00:57 · 567 阅读 · 0 评论 -
PHP判断PC或者手机
$ua = strtolower($_SERVER['HTTP_USER_AGENT']); $uachar = "/(nokia|sony|ericsson|mot|samsung|sgh|lg|philips|panasonic|alcatel|lenovo|cldc|midp|mobile|ipad|iphone|android)/i"; if(preg_转载 2014-02-18 15:01:37 · 564 阅读 · 0 评论 -
PHP无限极分类
$list = array ( array ('id' => '1','menuname' => '系统设置','parentid' => '0','sort' => '0',), array ('id' => '2','menuname' => '用户管理','parentid' => '0','sort' => '1',), array ('id' =原创 2014-02-18 14:58:56 · 469 阅读 · 0 评论
分享