{"id":838,"date":"2013-04-27T14:57:47","date_gmt":"2013-04-27T06:57:47","guid":{"rendered":"http:\/\/hesiwei.cn\/?p=838"},"modified":"2013-04-27T14:57:47","modified_gmt":"2013-04-27T06:57:47","slug":"%e5%ae%89%e8%a3%85ecshop%e9%a6%96%e9%a1%b5%e5%90%8e%e5%8f%b0%e6%8a%a5%e9%94%99%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/hesiwei.cn\/?p=838","title":{"rendered":"\u5b89\u88c5ecshop\u9996\u9875\u540e\u53f0\u62a5\u9519\u95ee\u9898"},"content":{"rendered":"<p>1\uff0c\u7edf\u4e00\u89e3\u51b3<br \/>\nphp.ini\u4e2d\u7684\u914d\u7f6e error_reporting = E_ALL | E_STRICT<br \/>\n\u8fd9\u662f\u8bf4\uff0c\u663e\u793a\u90a3\u4e9b\u4e0d\u7b26\u5408\u7f16\u7801\u89c4\u8303\u7684\u8b66\u544a\uff08coding standards warnings\uff09\u3002<br \/>\n\u5efa\u8bae\u53d6\u6d88error\u7684\u8f93\u51fa\uff0c\u5982\u679c\u51fa\u4e8e\u8c03\u8bd5\u9700\u8981\uff0c\u5e94\u6539\u4e3a<br \/>\nerror_reporting = E_ALL &#038; ~E_NOTICE<br \/>\n<!--more--><br \/>\n2.\u9996\u9875\u51fa\u73b0\u62a5\u9519\uff1aOnly variables should be passed by referen<br \/>\n\u627e\u5230\u51fa\u9519\u884c\uff08includes\\cls_template.php \u6587\u4ef6\u7684418\u884c\uff09<br \/>\n$tag_sel = array_shift(explode(&#8216; &#8216;, $tag));<br \/>\n\u6539\u6210\uff1a<br \/>\n$tag_bak = explode(&#8216; &#8216;, $tag);<br \/>\n$tag_sel = array_shift($tag_bak);<br \/>\n\u56e0\u4e3aarray_shift\u7684\u53c2\u6570\u662f\u5f15\u7528\u4f20\u9012\u7684\uff0c5.3\u4ee5\u4e0a\u9ed8\u8ba4\u53ea\u80fd\u4f20\u9012\u5177\u4f53\u7684\u53d8\u91cf\uff0c\u800c\u4e0d\u80fd\u901a\u8fc7\u51fd\u6570\u8fd4\u56de\u503c\uff0c\u540e\u53f0\u66f4\u65b0\u7f13\u5b58\u540e\u6b63\u5e38\u3002<br \/>\n\u53e6\u4e00\u4e2a\u5730\u65b9\u540c\u6837\u4fee\u6539\uff08includes\\lib_main.php&#8221;\u6587\u4ef6\u76841329\u884c\uff09\uff1a<br \/>\n\/\/$ext = end(explode(&#8216;.&#8217;, $tmp));<br \/>\n$ext_bak = explode(&#8216;.&#8217;, $tmp);<br \/>\n$ext = end($ext_bak);<\/p>\n<p>3.Strict Standards: Non-static method cls_image::gd_version() should not be called statically<br \/>\n\u627e\u5230\u51fa\u9519\u884c\uff08includes\\lib_base.php&#8221;\u6587\u4ef6\u7684346\u884c\uff09<br \/>\nreturn cls_image::gd_version();<br \/>\n\u6539\u6210\uff1a<br \/>\n$p = new cls_image();<br \/>\nreturn $p->gd_version();<br \/>\n\u662f\u56e0\u4e3agd_version()\u65b9\u6cd5\u672a\u58f0\u660e\u9759\u6001static\uff0c\u6240\u4ee5\u4f1a\u51fa\u9519\u3002<\/p>\n<p>4. Strict standards: mktime(): You should be using the time() function instead<br \/>\n\u9519\u8bef\u884c\uff1a$auth = mktime();<br \/>\nPHP\u624b\u518c\u91cchttp:\/\/cn2.php.net\/manual\/en\/function.mktime.php\u6709\u4e2aNote:<br \/>\nAs of PHP 5.1, when called with no arguments, mktime() throws an E_STRICT notice: use the time() function instead.<br \/>\n\u81ea\u4ecePHP5.1\u8d77,\u8c03\u7528\u8fd9\u4e2a\u51fd\u6570\u4e0d\u4f20\u9012\u53c2\u6570\uff0c\u4f1a\u51fa\u73b0\u4e00\u4e2a notice<br \/>\n@mktime()<br \/>\n\u524d\u9762\u52a0@\u5c4f\u853dmktime\u51fa\u9519\u65f6\u63d0\u793a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\uff0c\u7edf\u4e00\u89e3\u51b3 php.ini\u4e2d\u7684\u914d\u7f6e error_reporting = E_ALL | E_STRICT \u8fd9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[36],"class_list":["post-838","post","type-post","status-publish","format-standard","hentry","category-php","tag-ecshop"],"_links":{"self":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/838","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=838"}],"version-history":[{"count":0,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=\/wp\/v2\/posts\/838\/revisions"}],"wp:attachment":[{"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=838"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=838"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/hesiwei.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=838"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}