<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://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>http://jackxiang.com/post//</link>
<title><![CDATA[ PHP提示Notice: Undefined variable的解决办法，Warning: Missing argument 1 for function，warning: Missing argument 2 for variable_get()。]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Tue, 01 Mar 2016 15:05:29 +0000</pubDate> 
<guid>http://jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	问题一：<br/>在测试PHP代码的过程中，会遇到这样的问题：PHP提示Notice: Undefined variable，遇到这样的问题很纠结，但是很容易解决。<br/>&nbsp;&nbsp;&nbsp;&nbsp;今天晚上，我就遇到了这样的问题，到网上搜索了很多解决方法，整理如下，仅供参考，同时再次感谢网上各位大牛给大家提供的各式各样的方法！<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;PHP默认的配置会报这个错误，虽然有利于发现错误，但同时字现实实践中会出现很多问题。<br/>&nbsp;&nbsp; 解决方法如下：<br/>&nbsp;&nbsp; 一、修改php.ini配置文件<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;error_reporting设置：<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;找到error_reporting = E_ALL<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;修改为error_reporting = E_ALL &amp; ~E_NOTICE<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; error_reporting(E_ALL ^ E_DEPRECATED ^ E_NOTICE);//解决Deprecated: mysql_connect(): The mysql extension is&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;deprecated and will be removed in the future<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 原理是：减弱PHP的敏感程度，使其遇到这种问题不报错。<br/>&nbsp;&nbsp;&nbsp;&nbsp;二、在文件的php的头部加入一下代码：<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ini_set(&quot;error_reporting&quot;,&quot;E_ALL &amp; ~E_NOTICE&quot;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 同样也可以解决问题。<br/>&nbsp;&nbsp;&nbsp;&nbsp;三、参考一下这篇文章：<br/>&nbsp;&nbsp;《当遇到：Notice …Undefined variable…》<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网址是：http://www.phpiask.com/?p=276<br/><br/><br/>来自：http://blog.csdn.net/chenyanggo/article/details/7430383<br/><br/><br/>问题二：<br/>遇到Warning: Missing argument 1 for checkLogin(), called in C:&#92;wamp&#92;www&#92;library222&#92;admin&#92;main.php on line 4 and defined in C:&#92;wamp&#92;www&#92;library222&#92;admin&#92;inc&#92;conn.php on line 51<br/><br/>/***********************************************************************/<br/>//检查管理员是否登录<br/>function checkLogin($id)<br/>&#123;<br/>&nbsp;&nbsp; session_start();<br/> if(!isset($_SESSION[&#039;sid&#039;]))<br/> &#123;<br/>&nbsp;&nbsp;echo &quot;&lt;script language=&#039;javascript&#039;&gt;alert(&#039;请先登录！&#039;);parent.location.href=&#039;index.php&#039;;&lt;/script&gt;&quot;;<br/> &#125;<br/> if($id==0)return;<br/>&#125;<br/>?&gt;<br/><br/><br/>调用函数checkLogin的时候少了参数。<br/>稍微改下：<br/>function checkLogin($id = 0)&#123;<br/>...<br/>&#125;<br/><br/>来自：http://zhidao.baidu.com/link?url=wddMxfPvxDPCMFGo-uc5kRc2gflkJgofmKutyj1A2d4fc_6B566BjWftMvRpeQvAgjhR6Guznz1BfLa2uH8_Qi0P53TyIto_GeDYYe81Slq<br/>来自：http://www.thinkindrupal.com/node/495
]]>
</description>
</item><item>
<link>http://jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论]  PHP提示Notice: Undefined variable的解决办法，Warning: Missing argument 1 for function，warning: Missing argument 2 for variable_get()。]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>