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 · 2463 阅读 · 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 · 822 阅读 · 0 评论 -
php生成xml文件
<?php function 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 · 606 阅读 · 0 评论