![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
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 · 416 阅读 · 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 · 522 阅读 · 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 · 479 阅读 · 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 · 422 阅读 · 0 评论