<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>人生若只如初見 &#187; php_mbstring</title>
	<atom:link href="http://www.78wd.com/tag/php_mbstring/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.78wd.com</link>
	<description>i PanGel,and U</description>
	<lastBuildDate>Tue, 07 Feb 2012 07:26:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
		<item>
		<title>Centos下安装php的mbstring扩展</title>
		<link>http://www.78wd.com/mbstring/</link>
		<comments>http://www.78wd.com/mbstring/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 14:25:41 +0000</pubDate>
		<dc:creator>pangel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[mb_substr]]></category>
		<category><![CDATA[php_mbstring]]></category>

		<guid isPermaLink="false">http://www.78wd.com/?p=435</guid>
		<description><![CDATA[php的mbstring扩展如果没有安装会导致一些问题，例如登陆phpMyAdmin的时候会提示没字符串编码和字符串处理库php_mbstring，有些程序中会用到mb_substr函数没有php的mbstring扩展当这些程序运行的时候通常会提示“Fatal error: Call to undefined function mb_substr()”，对于第二个问题可以用另一篇文章“mb_substr修正函数”解决。 但是如果你有自己的服务器或者vps的权限还是安装php的mbstring扩展好，下面是安装步骤，很简单： SSH连接之后 yum -y install php-mbstring 然后编辑你的php.ini文件添加 extension=mbstring.so 最后重启httpd服务 service httpd restart 完成。]]></description>
			<content:encoded><![CDATA[<p>php的mbstring扩展如果没有安装会导致一些问题，例如登陆phpMyAdmin的时候会提示没字符串编码和字符串处理库php_mbstring，有些程序中会用到mb_substr函数没有php的mbstring扩展当这些程序运行的时候通常会提示“Fatal error: Call to undefined function mb_substr()”，对于第二个问题可以用另一篇文章“<a href="http://www.78wd.com/mb-substr/">mb_substr修正函数</a>”解决。<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1742180668176433";
/* 468x60, 创建于 10-3-25 */
google_ad_slot = "2888733453";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
但是如果你有自己的服务器或者vps的权限还是安装php的mbstring扩展好，下面是安装步骤，很简单：<br />
SSH连接之后</p>
<pre class="brush: bash;">
yum -y install php-mbstring
</pre>
<p>然后编辑你的php.ini文件添加</p>
<pre class="brush: php;">
extension=mbstring.so
</pre>
<p>最后重启httpd服务</p>
<pre class="brush: bash;">
service httpd restart
</pre>
<p>完成。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.78wd.com/mbstring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mb_substr修正函数</title>
		<link>http://www.78wd.com/mb-substr/</link>
		<comments>http://www.78wd.com/mb-substr/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 03:29:39 +0000</pubDate>
		<dc:creator>pangel</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[mbstring]]></category>
		<category><![CDATA[mb_substr]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php_mbstring]]></category>

		<guid isPermaLink="false">http://www.78wd.com/?p=423</guid>
		<description><![CDATA[不支持mb_substr函数的环境中使用了mb_substr函数会出现“Fatal error: Call to undefined function mb_substr()”的提示，下面的函数是定义的替代mb_substr的函数，作用是一样的，用于不支持mb_substr的地方。 // Patch in multibyte support if (!function_exists('mb_substr')) { function mb_substr($str, $start, $len = '', $encoding=&#34;UTF-8&#34;){ $limit = strlen($str); for ($s = 0; $start &#62; 0;--$start) {// found the real start if ($s &#62;= &#8230; <a href="http://www.78wd.com/mb-substr/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>不支持mb_substr函数的环境中使用了mb_substr函数会出现“Fatal error: Call to undefined function mb_substr()”的提示，下面的函数是定义的替代mb_substr的函数，作用是一样的，用于不支持mb_substr的地方。<br />
<script type="text/javascript"><!--
google_ad_client = "pub-1742180668176433";
/* 468x60, 创建于 10-3-25 */
google_ad_slot = "2888733453";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<pre class="brush: php;">
// Patch in multibyte support
if (!function_exists('mb_substr')) {
    function mb_substr($str, $start, $len = '', $encoding=&quot;UTF-8&quot;){
        $limit = strlen($str);

        for ($s = 0; $start &gt; 0;--$start) {// found the real start
            if ($s &gt;= $limit)
                break;

            if ($str[$s] &lt;= &quot;\x7F&quot;)
                ++$s;
            else {
                ++$s; // skip length

                while ($str[$s] &gt;= &quot;\x80&quot; &amp;&amp; $str[$s] &lt;= &quot;\xBF&quot;)
                    ++$s;
            }
        }

        if ($len == '')
            return substr($str, $s);
        else
            for ($e = $s; $len &gt; 0; --$len) {//found the real end
                if ($e &gt;= $limit)
                    break;

                if ($str[$e] &lt;= &quot;\x7F&quot;)
                    ++$e;
                else {
                    ++$e;//skip length

                    while ($str[$e] &gt;= &quot;\x80&quot; &amp;&amp; $str[$e] &lt;= &quot;\xBF&quot; &amp;&amp; $e &lt; $limit)
                        ++$e;
                }
            }

        return substr($str, $s, $e - $s);
    }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.78wd.com/mb-substr/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)

Served from: www.78wd.com @ 2012-02-11 10:49:04 -->
