<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>https://jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>https://jackxiang.com/post//</link>
<title><![CDATA[[实践Ok]Mysql连接升级为Mysqli函数对应关系以解决The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 报错]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Fri, 12 Feb 2016 12:10:36 +0000</pubDate> 
<guid>https://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:<br/>mysqli 更严谨 安全 高效 <br/><br/>php 5个版本,5.2、5.3、5.4、5.5，怕跟不上时代，新的服务器直接上5.5，但是程序出现如下错误：Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in，看意思就很明了，说mysql_connect这个模块将在未来弃用，请你使用mysqli或者PDO来替代。<br/><br/>解决方法1：<br/>禁止php报错<br/>display_errors = On<br/>改为<br/>display_errors = Off<br/><br/>鉴于这个服务器都是给用户用的，有时候他们需要报错(…都是给朋友用的,^_^)，不能这做，让他们改程序吧，看方案2.<br/><br/>解决方法2：<br/>&lt;?php<br/>error_reporting(E_ALL ^ E_DEPRECATED);<br/><br/>以上来自：http://www.cnblogs.com/bjxing/p/3555929.html<br/>————————————————————————————————————————————————————————————<br/><br/><br/><br/>解决The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 报错<br/>很明显的提示 mysql扩展模块就要被放弃使用了，所以请使用mysqli代替<br/><br/>这个说明你的php版本过高造成的。<br/><br/>解决方法：<br/>把mysql的相关模块全都改为mysqli就行了。<br/>比如：<br/>1、mysql_connect 改为mysqli_connect<br/><br/>2、mysql_query 改为mysqli_query<br/><br/>3、mysql_close 改为 mysqli_close<br/><br/>4、mysql_select_db 改为 mysqli_select_db<br/><br/>5、mysql_error 改为 mysqli_error<br/><br/>等等！<br/>来自：http://www.inbeijing.org/archives/1017<br/><br/><br/>———————————————————————————————————<br/>mysql_select_db&nbsp;&nbsp;==&gt; mysqli_select_db:<br/><textarea name="code" class="php" rows="15" cols="100">
&lt;?php
$con=mysqli_connect(&quot;localhost&quot;,&quot;my_user&quot;,&quot;my_password&quot;,&quot;my_db&quot;);
// Check connection
if (mysqli_connect_errno($con))
&#123;
echo &quot;Failed to connect to MySQL: &quot; . mysqli_connect_error();
&#125;

// ...some PHP code for database &quot;my_db&quot;...

// Change database to &quot;test&quot;
mysqli_select_db($con,&quot;test&quot;);

// ...some PHP code for database &quot;test&quot;...

mysqli_close($con);
?&gt;
</textarea><br/><br/>来自：http://www.runoob.com/php/func-mysqli-select-db.html<br/><br/><br/>用mysqli的函数连接mysql出现warning: mysqli::real_connect(): (hy000/1040): too many connections in ：<br/>https://jackxiang.com/post/8500/
]]>
</description>
</item><item>
<link>https://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [实践Ok]Mysql连接升级为Mysqli函数对应关系以解决The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in 报错]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>https://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>