{"id":69,"date":"2013-12-03T03:04:22","date_gmt":"2013-12-02T19:04:22","guid":{"rendered":"http:\/\/www.yptk.cn\/index.php\/2013\/12\/03\/%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aphp%e4%b9%8b%e7%ac%ac%e4%b8%83%e5%a4%a9\/"},"modified":"2013-12-03T03:04:22","modified_gmt":"2013-12-02T19:04:22","slug":"%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aphp%e4%b9%8b%e7%ac%ac%e4%b8%83%e5%a4%a9","status":"publish","type":"post","link":"http:\/\/yptk.cn\/index.php\/2013\/12\/03\/%e5%8d%81%e5%a4%a9%e5%ad%a6%e4%bc%9aphp%e4%b9%8b%e7%ac%ac%e4%b8%83%e5%a4%a9\/","title":{"rendered":"\u5341\u5929\u5b66\u4f1aphp\u4e4b\u7b2c\u4e03\u5929"},"content":{"rendered":"<p><span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">\u5b66\u4e60\u76ee\u7684\uff1a\u5b66\u4f1aSESSION\u7684\u4f7f\u7528<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; SESSION\u7684\u4f5c\u7528\u5f88\u591a\uff0c\u6700\u591a\u7528\u7684\u5c31\u662f\u7ad9\u70b9\u5185\u9875\u9762\u95f4\u53d8\u91cf\u4f20\u9012\u3002\u5728\u9875\u9762\u5f00\u59cb\u6211\u4eec\u8981session_start();\u5f00\u542fSESSION\uff1b<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; \u7136\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528SESSION\u53d8\u91cf\u4e86\uff0c\u6bd4\u5982\u8bf4\u8981\u8d4b\u503c\u5c31\u662f\uff1a$_SESSION[&#8216;item&#8217;]=&#8221;item1&#8243;;\u8981\u5f97\u5230\u503c\u5c31\u662f$item1=$_SESSION[&#8216;item&#8217;];\uff0c\u5f88\u7b80\u5355\u5427\u3002\u8fd9\u91cc\u6211\u4eec\u53ef\u80fd\u4f1a\u4f7f\u7528\u5230\u4e00\u4e9b\u51fd\u6570\uff0c\u6bd4\u5982\u8bf4\u5224\u65ad\u662f\u4e0d\u662f\u67d0SESSION\u53d8\u91cf\u4e3a\u7a7a\uff0c\u53ef\u4ee5\u8fd9\u4e48\u5199\uff1aempty($_SESSION[&#8216;inum&#8217;])\u8fd4\u56detrue or false\u3002<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; \u4e0b\u9762\u7efc\u5408\u4e00\u4e0b\u524d\u9762\u6240\u8bf4\u7684\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u767b\u9646\u7a0b\u5e8f\uff0c\u5224\u65ad\u7528\u6237\u540d\u5bc6\u7801\u662f\u5426\u6b63\u786e\u3002<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; \u767b\u9646\u8868\u5355\u662f\u8fd9\u6837\uff1alogin.php<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;table width=&#8221;100%&#8221; height=&#8221;100%&#8221; border=&#8221;0&#8243; align=&#8221;center&#8221; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span class=\"style1\" style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\"><span style=\"color:#ff0000;\"><span style=\"color:#000000;\">&nbsp;&nbsp;<\/span>&lt;form action=&#8221;checklogin.php&#8221; method=&#8221;post&#8221;&gt;<\/span><\/span><span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&lt;td align=&#8221;center&#8221; valign=&#8221;middle&#8221;&gt;&lt;table width=&#8221;400&#8243; border=&#8221;0&#8243; cellpadding=&#8221;5&#8243; cellspacing=&#8221;1&#8243; class=&#8221;tablebg&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;tr class=&#8221;tdbg&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td colspan=&#8221;2&#8243;&gt;&lt;div align=&#8221;center&#8221;&gt;Administrators Login&lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;tr class=&#8221;tdbg&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td&gt;&lt;div align=&#8221;center&#8221;&gt;Username&lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td&gt;&lt;div align=&#8221;center&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;color:#ff0000;\"><span class=\"style1\"><span style=\"color:#000000;\">&nbsp;&nbsp;<\/span><span style=\"color:#ffffff;\">&lt;input name=&#8221;username&#8221; type=&#8221;text&#8221; id=&#8221;username&#8221;&gt;<\/span><\/span><br \/>\n<\/span><span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;tr class=&#8221;tdbg&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td&gt;&lt;div align=&#8221;center&#8221;&gt;Password&lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td&gt;&lt;div align=&#8221;center&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;color:#ff0000;\"><span class=\"style1\"><span style=\"color:#000000;\">&nbsp;&nbsp;<\/span><span style=\"color:#ffffff;\">&lt;input name=&#8221;password&#8221; type=&#8221;password&#8221; id=&#8221;password&#8221;&gt;<\/span><\/span><br \/>\n<\/span><span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;tr class=&#8221;tdbg&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;td colspan=&#8221;2&#8243;&gt;&lt;div align=&#8221;center&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;input type=&#8221;submit&#8221; name=&#8221;Submit&#8221; value=&#8221;Submit&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;input type=&#8221;reset&#8221; name=&#8221;Submit2&#8243; value=&#8221;Clear&#8221;&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/div&gt;&lt;\/td&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&lt;\/tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/table&gt;&lt;\/td&gt;&lt;\/form&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/tr&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;\/table&gt;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; \u5904\u7406\u6587\u4ef6\u662f\u8fd9\u6837<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; &lt;?<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; require_once(&#8216;conn.php&#8217;);<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; session_start();<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; $username=$_POST[&#8216;username&#8217;];<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; $password=$_POST[&#8216;password&#8217;];<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; $exec=&#8221;select * from admin where username='&#8221;.$username.&#8221;&#8216;&#8221;;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; if($result=mysql_query($exec))<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; {<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;if($rs=mysql_fetch_object($result))<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;{<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;if($rs-&gt;password==$password)<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;{<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$_SESSION[&#8216;adminname&#8217;]=$username;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;header(&#8220;location:index.php&#8221;);<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;else<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;{<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo &#8220;&lt;script&gt;alert(&#8216;Password Check Error!&#8217;);location.href=&#8217;login.php&#8217;;&lt;\/script&gt;&#8221;;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;&nbsp;&nbsp;}<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;}<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;else<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;{<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;echo &#8220;&lt;script&gt;alert(&#8216;Username Check Error!&#8217;);location.href=&#8217;login.php&#8217;;&lt;\/script&gt;&#8221;;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;}<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;&nbsp;}<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; else<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp; {<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">&nbsp;echo &#8220;&lt;script&gt;alert(&#8216;Database Connection Error!&#8217;);location.href=&#8217;login.php&#8217;;&lt;\/script&gt;&#8221;;<\/span><br style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\" \/><br \/>\n<span style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;background-color:#FBFBFB;\">}<\/span><\/p>\n<p style=\"font-family:Simsun;font-size:14px;line-height:21.33333396911621px;white-space:normal;\">\n\t&nbsp; ?&gt;<br \/>\n&nbsp; conn.php\u662f\u8fd9\u6837\uff1a<br \/>\n&nbsp; &lt;?<br \/>\n&nbsp; $conn=mysql_connect (&#8220;127.0.0.1&#8221;, &#8220;&#8221;, &#8220;&#8221;);<br \/>\n&nbsp; mysql_select_db(&#8220;shop&#8221;);&nbsp;<br \/>\n&nbsp; ?&gt;&nbsp;<br \/>\n&nbsp; \u7531\u4e8e&nbsp;$_SESSION[&#8216;adminname&#8217;]=$username;\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u5199\u9a8c\u8bc1\u662f\u5426\u767b\u9646\u8bed\u53e5\u7684\u6587\u4ef6\uff1acheckadmin.asp<br \/>\n&nbsp; &lt;?<br \/>\n&nbsp; session_start();<br \/>\n&nbsp; if($_SESSION[&#8216;adminname&#8217;]==&#8221;)<br \/>\n&nbsp; {<br \/>\n&nbsp; echo &#8220;&lt;script&gt;alert(&#8216;Please Login First&#8217;);location.href=&#8217;login.php&#8217;;&lt;\/script&gt;&#8221;;<br \/>\n&nbsp; }<br \/>\n&nbsp; ?&gt;&nbsp;<br \/>\n&nbsp; \u5475\u5475\uff0c\u4eca\u5929\u8bf4\u5230\u8fd9\u91cc\uff0c\u660e\u5929\u8bf4\u4e00\u4e0b\u600e\u4e48\u5f04\u4e00\u4e2a\u5206\u9875\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5b66\u4e60\u76ee\u7684\uff1a\u5b66\u4f1aSESSION\u7684\u4f7f\u7528 &nbsp; SESSION\u7684\u4f5c\u7528\u5f88\u591a\uff0c\u6700\u591a\u7528\u7684\u5c31\u662f\u7ad9\u70b9\u5185\u9875\u9762\u95f4\u53d8\u91cf\u4f20\u9012\u3002\u5728\u9875\u9762\u5f00\u59cb\u6211\u4eec\u8981session_start();\u5f00\u542fSESSION\uff1b &nbsp; \u7136\u540e\u5c31\u53ef\u4ee5\u4f7f\u7528SESSION\u53d8\u91cf\u4e86\uff0c\u6bd4\u5982\u8bf4\u8981\u8d4b\u503c\u5c31\u662f\uff1a$_SESSION[&#8216;item&#8217;]=&#8221;item1&#8243;;\u8981\u5f97\u5230\u503c\u5c31\u662f$item1=$_SESSION[&#038;#8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[15],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-15"],"_links":{"self":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":0,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"wp:attachment":[{"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yptk.cn\/index.php\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}