![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
文章平均质量分 50
jonlys
这个作者很懒,什么都没留下…
展开
-
字节转换MB
function sizeformat($bytesize){ $i=0; //当$bytesize 大于是1024字节时,开始循环,当循环到第4次时跳出; while(abs($bytesize)>=1024){ $bytesize=$bytesize/1024; $i++; if($i==4)原创 2012-01-10 14:33:58 · 2470 阅读 · 0 评论 -
遇到超链接自动加上a标签
$jieshao = "I think you'll like the entrepreneur club, join here http://test.com/group/profile/68/ENTREPRENEUR_CLUB";$message = eregi_replace("(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)","\\1"原创 2012-05-08 14:13:53 · 826 阅读 · 0 评论 -
php生成xml文件
<?phpfunction stripSpecial($str){ $str = iconv('', 'utf-8', $str); $str = htmlspecialchars($str); //$str = ''; return $str;}function setXmldata($loc, $lastmod, $changefreq, $priority){ $loc =原创 2012-12-03 17:42:14 · 608 阅读 · 0 评论