{"id":40,"date":"2010-07-21T20:35:16","date_gmt":"2010-07-21T20:35:16","guid":{"rendered":"https:\/\/shan.info\/new\/notice-undefined-variable-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95\/"},"modified":"2010-07-21T20:35:16","modified_gmt":"2010-07-21T20:35:16","slug":"notice-undefined-variable-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/shan.info\/new\/notice-undefined-variable-%e7%9a%84%e8%a7%a3%e5%86%b3%e6%96%b9%e6%b3%95\/","title":{"rendered":"Notice: Undefined variable \u7684\u89e3\u51b3\u65b9\u6cd5"},"content":{"rendered":"<p>\u8fd9\u662fPHP\u8b66\u544a\u4fe1\u606f\uff0c\u662f\u7531\u4e8e\u672a\u5b9a\u4e49\u53d8\u91cf\u5f15\u8d77\u7684\u3002<\/p>\n<p>\u6bd4\u5982:\u4f60\u672a\u8bbe\u7f6e\u53d8\u91cf,\u5374\u5728php\u4e2d\u7528echo $varstr \u4e86,\u5c31\u4f1a\u51fa\u663e\u8fd9\u79cd\u60c5\u51b5,<\/p>\n<p>\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<p>\u4fee\u6539php.ini <\/p>\n<p>\u5c06\uff1a error_reporting = E_ALL<\/p>\n<p>\u4fee\u6539\u4e3a\uff1aerror_reporting = E_ALL &amp; ~E_NOTICE<\/p>\n<p>\u5982\u679c\u4ec0\u4e48\u9519\u8bef\u90fd\u4e0d\u60f3\u8ba9\u663e\u793a\uff0c\u76f4\u63a5\u4fee\u6539\uff1a<\/p>\n<p>display_errors = Off<\/p>\n<p>\u5982\u679c\u4f60\u6ca1\u6709php.ini\u7684\u4fee\u6539\u6743\u9650,\u53ef\u5728php\u5934\u90e8\u52a0\u5165<\/p>\n<p>ini_set(&#8220;error_reporting&#8221;,&#8221;E_ALL &amp; ~E_NOTICE&#8221;);<\/p>\n<p>\u5373\u53ef<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662fPHP\u8b66\u544a\u4fe1\u606f\uff0c\u662f\u7531\u4e8e\u672a\u5b9a\u4e49\u53d8\u91cf\u5f15\u8d77\u7684\u3002 \u6bd4\u5982:\u4f60\u672a\u8bbe\u7f6e\u53d8\u91cf,\u5374\u5728php\u4e2d\u7528echo $varstr \u4e86,\u5c31\u4f1a\u51fa\u663e\u8fd9\u79cd\u60c5\u51b5, \u89e3\u51b3\u65b9\u6cd5\uff1a \u4fee\u6539php.ini \u5c06\uff1a error_reporting = E_ALL \u4fee\u6539\u4e3a\uff1aerror_reporting = E_ALL &amp; ~E_NOTICE \u5982\u679c\u4ec0\u4e48\u9519\u8bef\u90fd\u4e0d\u60f3\u8ba9\u663e\u793a\uff0c\u76f4\u63a5\u4fee\u6539\uff1a display_errors = Off \u5982\u679c\u4f60\u6ca1\u6709php.ini\u7684\u4fee\u6539\u6743\u9650,\u53ef\u5728php\u5934\u90e8\u52a0\u5165 ini_set(&#8220;error_reporting&#8221;,&#8221;E_ALL &amp; ~E_NOTICE&#8221;); \u5373\u53ef<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-22"],"_links":{"self":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shan.info\/new\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}