 {"id":435,"date":"2012-05-11T11:11:35","date_gmt":"2012-05-11T03:11:35","guid":{"rendered":"http:\/\/www.qyuef.com\/?p=435"},"modified":"2012-05-11T11:11:35","modified_gmt":"2012-05-11T03:11:35","slug":"%e7%bb%87%e6%a2%a6dedecms%e5%90%8e%e5%8f%b0%e6%96%87%e4%bb%b6%e5%88%97%e8%a1%a8%e6%8c%89%e6%96%87%e4%bb%b6%e5%90%8d%e6%8e%92%e5%ba%8f%e7%9a%84%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/www.qyuef.com\/?p=435","title":{"rendered":"\u7ec7\u68a6DedeCMS\u540e\u53f0\u6587\u4ef6\u5217\u8868\u6309\u6587\u4ef6\u540d\u6392\u5e8f\u7684\u65b9\u6cd5"},"content":{"rendered":"<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\">\u540e\u53f0\u6587\u4ef6\u5217\u8868\u6309\u6587\u4ef6\u540d\u6392\u5e8f\u7684\u65b9\u6cd5: \u7ec7\u68a6<a href=\"http:\/\/www.dengor.com\/archives\/tag\/dede\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; color: rgb(59,89,152); padding-top: 0px; text-decoration: none\" title=\"dede\u76f8\u5173\u6587\u7ae0\">dede<\/a>\u7cfb\u7edf\u7684\u540e\u53f0\u6587\u4ef6, \u9ed8\u8ba4\u7684\u6392\u5e8f\u5f88\u4e71, \u4e0d\u662f\u6309\u540d\u79f0, \u4e5f\u4e0d\u662f\u6309\u65f6\u95f4, \u5982\u679c\u76ee\u5f55\u5185\u5bb9\u5f88\u591a\u7684\u8bdd, \u5f88\u96be\u627e\u5230\u81ea\u5df1\u60f3\u8981\u7684\u6587\u4ef6:<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_1444\" style=\"border-right: rgb(221,221,221) 1px solid; padding-right: 0px; border-top: rgb(221,221,221) 1px solid; display: block; padding-left: 0px; padding-bottom: 5px; margin: 0px auto 5px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; border-left: rgb(221,221,221) 1px solid; width: 359px; color: rgb(51,51,51); text-indent: 0px; padding-top: 5px; border-bottom: rgb(221,221,221) 1px solid; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: center; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px; background-origin: initial; background-clip: initial; border-image: initial\"><a href=\"http:\/\/www.qyuef.com\/?attachment_id=1444\" rel=\"attachment wp-att-1444\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; color: rgb(59,89,152); padding-top: 0px; text-decoration: none\"><img loading=\"lazy\" alt=\"\u6ca1\u6709\u6309\u540d\u5b57\u6392\u5e8f\" class=\"lazyload size-full wp-image-1444\" height=\"243\" src=\"http:\/\/www.qyuef.com\/wp-content\/themes\/2022072007404724\/img\/post_loading.gif\" data-original=\"http:\/\/www.dengor.com\/wp-content\/uploads\/2012\/03\/dir.jpg\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; border-top-style: none; padding-top: 0px; border-right-style: none; border-left-style: none; border-bottom-style: none; border-image: initial\" title=\"dir\" width=\"349\" \/><\/a><\/p>\n<p class=\"wp-caption-text\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 3px 0px 0px; text-indent: 2em; padding-top: 0px\">\u6ca1\u6709\u6309\u540d\u5b57\u6392\u5e8f<\/p>\n<\/div>\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\">\u5b9e\u5728\u662f\u592a\u4e0d\u65b9\u4fbf\u4e86, \u4e8e\u662f\u60f3\u8ba9\u8fd9\u4e9b\u6587\u4ef6\u5217\u8868\u6309\u540d\u5b57\u6392\u5e8f, \u770b\u4e86\u4e00\u4e0b\u540e\u53f0\u7684\u6587\u4ef6, \u539f\u6765\u662f\u56e0\u4e3aphp\u7684\u51fd\u6570dir\u5f15\u8d77\u7684, \u4ee5&rdquo;\u9ed8\u8ba4\u6a21\u677f\u7ba1\u7406&rdquo;\u5728\u6587\u4ef6\u5217\u8868\u4e3a\u4f8b, \u5728\u540e\u53f0\u7684\u627e\u5230\u6a21\u677f\u6587\u4ef6: \/dede\/templets\/templets_default.htm (dede\u4e3a\u4f60\u7684\u540e\u53f0\u76ee\u5f55) ,\u6253\u5f00\u8fd9\u4e2a\u6587\u4ef6\u627e\u5230:<\/p>\n<blockquote style=\"border-right: rgb(204,204,204) 1px dashed; padding-right: 10px; border-top: rgb(204,204,204) 1px dashed; padding-left: 10px; padding-bottom: 5px; margin: 5px 0px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; border-left: rgb(204,204,204) 1px dashed; color: rgb(51,51,51); text-indent: 0px; padding-top: 5px; border-bottom: rgb(204,204,204) 1px dashed; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px; background-origin: initial; background-clip: initial; border-image: initial\">\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; text-indent: 2em; padding-top: 0px\">&nbsp;&lt;?php<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$dh = dir($templetdird);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\twhile($filename=$dh-&gt;read())<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t{<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\tif(!preg_match(&ldquo;#\\.htm#&rdquo;, $filename)) continue;<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$filetime = filemtime($templetdird.&rsquo;\/&rsquo;.$filename);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$filetime = MyDate(&ldquo;Y-m-d H:i&rdquo;,$filetime);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$fileinfo = (isset($fileinfos[$filename]) ? $fileinfos[$filename] : &lsquo;\u672a\u77e5\u6a21\u677f&rsquo;);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t?&gt;<\/p>\n<\/blockquote>\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\">\u53ef\u4ee5\u770b\u5f97\u51fa\u6765\u4f7f\u7528\u4e86PHP\u7684dir\u51fd\u6570\u5bfc\u81f4\u7684, dir()\u8bfb\u53d6\u7684\u6587\u4ef6\u662f\u65e0\u5e8f\u7684, \u73b0\u5728\u6211\u4eec\u8981\u60f3\u529e\u6cd5\u8ba9\u4ed6\u6309\u540d\u5b57\u6392\u5e8f, \u8fd9\u91cc\u53ef\u4ee5\u6539\u53e6\u4e00\u4e2a\u8bfb\u53d6\u76ee\u5f55\u6587\u4ef6\u7684\u51fd\u6570scandir(); \u8fd9\u4e2a\u51fd\u6570\u7684\u6587\u4ef6\u4f1a\u6309\u6587\u4ef6\u540d\u79f0\u6392\u5e8f, \u6539\u6210\u4e0b\u9762\u8fd9\u6837:<\/p>\n<blockquote style=\"border-right: rgb(204,204,204) 1px dashed; padding-right: 10px; border-top: rgb(204,204,204) 1px dashed; padding-left: 10px; padding-bottom: 5px; margin: 5px 0px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; border-left: rgb(204,204,204) 1px dashed; color: rgb(51,51,51); text-indent: 0px; padding-top: 5px; border-bottom: rgb(204,204,204) 1px dashed; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px; background-origin: initial; background-clip: initial; border-image: initial\">\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; text-indent: 2em; padding-top: 0px\">&lt;?php<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$files = scandir($templetdird);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\tforeach ($files as $filename)<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t{<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\tif(!preg_match(&ldquo;#\\.htm#&rdquo;, $filename)) continue;<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$filetime = filemtime($templetdird.&rsquo;\/&rsquo;.$filename);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$filetime = MyDate(&ldquo;Y-m-d H:i&rdquo;,$filetime);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t$fileinfo = (isset($fileinfos[$filename]) ? $fileinfos[$filename] : &lsquo;\u672a\u77e5\u6a21\u677f&rsquo;);<br style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px\" \/><br \/>\n\t\t?&gt;<\/p>\n<\/blockquote>\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\">\u6587\u4ef6\u5df2\u7ecf\u5168\u90e8\u6309\u540d\u5b57\u6392\u5e8f\u4e86,\u5f88\u5bb9\u6613\u627e\u5230\u81ea\u5df1\u8981\u7684\u6587\u4ef6:<\/p>\n<div class=\"wp-caption aligncenter\" id=\"attachment_1445\" style=\"border-right: rgb(221,221,221) 1px solid; padding-right: 0px; border-top: rgb(221,221,221) 1px solid; display: block; padding-left: 0px; padding-bottom: 5px; margin: 0px auto 5px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; border-left: rgb(221,221,221) 1px solid; width: 344px; color: rgb(51,51,51); text-indent: 0px; padding-top: 5px; border-bottom: rgb(221,221,221) 1px solid; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: center; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px; background-origin: initial; background-clip: initial; border-image: initial\"><a href=\"http:\/\/www.qyuef.com\/?attachment_id=1445\" rel=\"attachment wp-att-1445\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; color: rgb(59,89,152); padding-top: 0px; text-decoration: none\"><img loading=\"lazy\" alt=\"\u6309\u540d\u5b57\u6392\u5e8f\u7684\u5217\u8868\" class=\"lazyload size-full wp-image-1445\" height=\"242\" src=\"http:\/\/www.qyuef.com\/wp-content\/themes\/2022072007404724\/img\/post_loading.gif\" data-original=\"http:\/\/www.dengor.com\/wp-content\/uploads\/2012\/03\/dir2.jpg\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; border-top-style: none; padding-top: 0px; border-right-style: none; border-left-style: none; border-bottom-style: none; border-image: initial\" title=\"dir2\" width=\"334\" \/><\/a><\/p>\n<p class=\"wp-caption-text\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 3px 0px 0px; text-indent: 2em; padding-top: 0px\">\u6309\u540d\u5b57\u6392\u5e8f\u7684\u5217\u8868<\/p>\n<\/div>\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\">\u540e\u53f0\u8fd8\u6709\u5176\u5b83\u7684\u6709\u6587\u4ef6\u5217\u8868\u7684\u5730\u65b9\u4e5f\u4e00\u6837\u4fee\u6539\u5c31\u53ef\u4ee5\u4e86.<\/p>\n<p style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 5px; margin: 0px 0px 10px; word-spacing: 0px; font: 14px\/24px verdana, tahoma, 'bitstream vera sans', arial, helvetica, sans-serif; text-transform: none; color: rgb(51,51,51); text-indent: 2em; padding-top: 0px; white-space: normal; letter-spacing: normal; background-color: rgb(255,255,255); text-align: left; orphans: 2; widows: 2; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px\"><span style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; color: rgb(165,42,42); padding-top: 0px\">\u8f6c\u8f7d\u51fa\u5904:<span class=\"Apple-converted-space\">&nbsp;<\/span><a href=\"http:\/\/www.dengor.com\/archives\/1442.html\" style=\"padding-right: 0px; padding-left: 0px; padding-bottom: 0px; margin: 0px; color: rgb(59,89,152); padding-top: 0px; text-decoration: none\">http:\/\/www.dengor.com\/archives\/1442.html<\/a><span class=\"Apple-converted-space\">&nbsp;<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u540e\u53f0\u6587\u4ef6\u5217\u8868\u6309\u6587\u4ef6\u540d\u6392\u5e8f\u7684\u65b9\u6cd5: \u7ec7\u68a6dede\u7cfb\u7edf\u7684\u540e\u53f0\u6587\u4ef6, \u9ed8\u8ba4\u7684\u6392\u5e8f\u5f88\u4e71, \u4e0d\u662f\u6309\u540d\u79f0, \u4e5f\u4e0d\u662f\u6309\u65f6\u95f4, \u5982\u679c\u76ee\u5f55\u5185\u5bb9\u5f88\u591a\u7684\u8bdd, \u5f88\u96be\u627e\u5230\u81ea\u5df1\u60f3\u8981\u7684\u6587\u4ef6: \u6ca1\u6709\u6309\u540d\u5b57\u6392\u5e8f \u5b9e\u5728\u662f\u592a\u4e0d\u65b9\u4fbf\u4e86, \u4e8e\u662f\u60f3\u8ba9\u8fd9\u4e9b\u6587\u4ef6\u5217\u8868\u6309\u540d\u5b57\u6392\u5e8f, \u770b\u4e86\u4e00\u4e0b<a rel=\"nofollow\" class=\"more-link\" style=\"text-decoration:none;\" href=\"http:\/\/www.qyuef.com\/?p=435\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,8],"tags":[],"tcat":[],"_links":{"self":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts\/435"}],"collection":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=435"}],"version-history":[{"count":0,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=\/wp\/v2\/posts\/435\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=435"},{"taxonomy":"tcat","embeddable":true,"href":"http:\/\/www.qyuef.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftcat&post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}