<?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>CODIGG &#187; php5.1.2</title>
	<atom:link href="http://www.codigg.com/tag/php5-1-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codigg.com</link>
	<description>关注互联网，关注云计算，关注生活</description>
	<lastBuildDate>Fri, 08 Jul 2011 02:48:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP5.1下启用json_encode方法</title>
		<link>http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/</link>
		<comments>http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 02:56:32 +0000</pubDate>
		<dc:creator>Codigg</dc:creator>
				<category><![CDATA[Linux/Server]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[php5.1.2]]></category>
		<category><![CDATA[suse10]]></category>

		<guid isPermaLink="false">http://www.codigg.com/?p=451</guid>
		<description><![CDATA[php5.2之后才将php-json作为标准扩展，一些Linux发行版上的php版本依然还是5.1.x，如SuSE10.1 , 导致使用json很不方便。网上也有一些文章介绍如何在SuSE10SP1下启用该扩展，如：

Enabling JSON on PHP 5.1.2 in SLES10

可惜这篇文章的方法现在已经不能用了。这里介绍一些解决方法

方法一：直接用php写json_encode和json_decode的函数，然后调用，这个网上已经有一些开源的代码了，如 Service JSON 方法比较简单，但是使用也不是那么得心应手。这里不再赘述。

方法二：安装扩展，需要先安装php5-devel，因为要使用phpize，脚本如下：

<span class="readmore"><a href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/" title="PHP5.1下启用json_encode方法">阅读全文——共513字</a></span><h3>相关文章</h3><ul><li>0</li></ul><h3>最近评论</h3><ul><li><a class="commentor" href="http://wallinside.com/post-1278162.html" >marijuana seeds</a> : <a class="comment_content" href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comment-213086" title="View the entire comment by marijuana seeds" >A remarkable talk may be worth a comment. I believ...</a></li>
<li><a class="commentor" href="http://carlo.net.pl/oferta/konstrukcje-hal.html" >Wynajem Namiotow</a> : <a class="comment_content" href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comment-212979" title="View the entire comment by Wynajem Namiotow" >Very well written story. It will be supportive to ...</a></li>
<li><a class="commentor" href="http://xarthd.com/x-art-model-mia-inside-mia/" >Mia</a> : <a class="comment_content" href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comment-211795" title="View the entire comment by Mia" >The moment I originally commented I clicked your -...</a></li>
<li><a class="commentor" href="http://redyeastrice.bloghi.com/2012/01/20/does-red-yeast-rice-lower-your-cholesterol.html" >benefits of red yeast rice</a> : <a class="comment_content" href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comment-210899" title="View the entire comment by benefits of red yeast rice" >The moment I first left a comment I clicked your -...</a></li>
<li><a class="commentor" href="http://www.vvcvv.waw.pl/" >Merlyn Sood</a> : <a class="comment_content" href="http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/#comment-206248" title="View the entire comment by Merlyn Sood" >˙ţC</a></li>
</ul>]]></description>
		<wfw:commentRss>http://www.codigg.com/2009/09/suse-php-5-1-2-json-encode-decode/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

