<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></title> 
<link>http://www.bizeway.net/index.php</link> 
<description><![CDATA[网务通 - 网务公司发展之路]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[BIWEB开源PHP WMS系统创始人ArthurXF肖飞的blog]]></copyright>
<item>
<link>http://www.bizeway.net/read.php?</link>
<title><![CDATA[10进制和64进制转换的PHP函数]]></title> 
<author>ArthurXF &lt;arthurxf@gmail.com&gt;</author>
<category><![CDATA[PHP]]></category>
<pubDate>Sat, 09 Feb 2008 17:48:15 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?</guid> 
<description>
<![CDATA[ 
	　　PHP手册中只有最多到32进制转换的函数，64进制的没有，这里我提供两个我写的10to64和64to10转换的函数。这两个函数没考虑小数的情况，仅仅为整数的转换。此文由ArthurXF倾情奉献。<br/><div class="quote"><div class="quote-title">引用</div><div class="quote-content">/**<br/> * 将64进制的数值转换为10进制的数值<br/> * @author &nbsp;肖飞 (ArthurXF)<br/> * @param &nbsp;string &nbsp;$bit64 &nbsp; &nbsp;指定的64进制字符串<br/> * @return &nbsp;double<br/> */<br/>function make_bit10($bit64) {<br/> &nbsp;$strLetter = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/'; &nbsp; &nbsp;<br/> &nbsp;$intCount = strlen($bit64); &nbsp; &nbsp;<br/> &nbsp;for($i=0;$i<$intCount;$i++) {<br/> &nbsp; &nbsp;$pos = strpos($strLetter,$bit64[$i]);<br/> &nbsp; &nbsp;$bit10 += $pos * pow(64,$intCount-1-$i);<br/> &nbsp;}<br/> &nbsp;return $bit10;<br/>}<br/><br/>/**<br/> * 将10进制的数值转换为64进制的数值<br/> * @author &nbsp;肖飞 (ArthurXF)<br/> * @param &nbsp;double &nbsp; &nbsp;$bit10 &nbsp; &nbsp;指定10进制数字<br/> * @return &nbsp;string<br/> */<br/>function make_bit64($bit10) {<br/> &nbsp;$strLetter = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+/'; &nbsp; &nbsp;//很多大于int取值范围的大数是以字符串形式传入的,这里强制转成double,否则求余会有误差<br/> &nbsp;settype($bit10,"double");<br/> &nbsp;$intCount = ceil($bit10/64); &nbsp; &nbsp;<br/> &nbsp;for($i=0;$bit10>0;$i++) {<br/> &nbsp; &nbsp;$key = $bit10 % 64;<br/> &nbsp; &nbsp;if($key<0) $key = 64 + $key;<br/> &nbsp; &nbsp;$bit64 .= $strLetter[$key];<br/> &nbsp; &nbsp;$bit10 = floor($bit10 / 64);<br/> &nbsp;}<br/> &nbsp;return strrev($bit64);<br/>}<br/></div></div><br/>Tags - <a href="tag.php?tag=10%E8%BF%9B%E5%88%B6%E5%92%8C64%E8%BF%9B%E5%88%B6%E8%BD%AC%E6%8D%A2" rel="tag">10进制和64进制转换</a> , <a href="tag.php?tag=php" rel="tag">php</a>
]]>
</description>
</item><item>
<link>http://www.bizeway.net/read.php?&amp;guid=0#topreply</link>
<title><![CDATA[[评论] 10进制和64进制转换的PHP函数]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.bizeway.net/read.php?&amp;guid=0#topreply</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>