{"id":277595,"date":"2021-01-13T16:59:47","date_gmt":"2021-01-13T08:59:47","guid":{"rendered":"http:\/\/4563.org\/?p=277595"},"modified":"2021-01-13T16:59:47","modified_gmt":"2021-01-13T08:59:47","slug":"%e5%a6%82%e4%bd%95%e5%ae%9e%e4%be%8b%e5%8c%96%e4%b8%80%e4%b8%aa%e6%9c%89%e5%91%bd%e5%90%8d%e7%a9%ba%e9%97%b4%e7%9a%84%e5%8a%a8%e6%80%81%e7%b1%bb%ef%bc%9f%e5%a6%82%e4%b8%8b%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=277595","title":{"rendered":"\u5982\u4f55\u5b9e\u4f8b\u5316\u4e00\u4e2a\u6709\u547d\u540d\u7a7a\u95f4\u7684\u52a8\u6001\u7c7b\uff1f\u5982\u4e0b\u4ee3\u7801:"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u5982\u4f55\u5b9e\u4f8b\u5316\u4e00\u4e2a\u6709\u547d\u540d\u7a7a\u95f4\u7684\u52a8\u6001\u7c7b\uff1f\u5982\u4e0b\u4ee3\u7801:               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frozenway <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<pre><code>namespace appindexmodel;  function custom($bcids, $param){     foreach($bcids as $custom){         $file = env('extend_path').'custom\/'.$custom['module'].'.php';         if(file_exists($file)){             $res = custom$custom['module']::instance()-&gt;run();         }     } } <\/code><\/pre>\n<p>\u7c7b\u6587\u4ef6\u5728 custom \u76ee\u5f55\u4e0b,\u73b0\u5728\u8fd9\u6837\u4f1a\u62a5\u9519\uff0c\u5982\u679c\u53d8\u91cf\u6362\u6210\u8fd9\u6837<\/p>\n<pre><code>$res = customHello::instance()-&gt;run(); <\/code><\/pre>\n<p>\u5219\u4e0d\u4f1a\u62a5\u9519\uff0c\u5927\u795e\uff0c\u6c42\u52a9\u8be5\u600e\u4e48\u5199?<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>8<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4922858\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : frozenway <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f TP5.1 \u7684                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922859\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Fishdrowned <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             $res = &#8220;\\custom\\{$custom[&#8216;module&#8217;]}&#8221;::instance()-&gt;run();                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922860\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ben1024 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1.\u5b57\u7b26\u62fc\u63a5 &#8220;{$xxx}&#8221;<br \/>2.exec \u6267\u884c\u811a\u672c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922861\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jswh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u52a8\u6001\u8bbf\u95ee\u65f6\u57fa\u4e8e\u5b57\u7b26\u4e32\u7684\uff0c\u4f60\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u7f16\u8bd1\u5668\u4f1a\u5148\u628a\u5b57\u7b26\u66ff\u6362\u5230\u4ee3\u7801\u91cc\uff0c\u518d\u6267\u884c\u4ee3\u7801\uff0c<br \/>custom$custom[&#8216;module&#8217;],\u8fd9\u91cc\u7684\u95ee\u9898\u65f6\u4e0d\u7b26\u5408\u8bed\u6cd5\u89c4\u8303\uff0cnamespace \u4e0d\u80fd\u540e\u8857\u53d8\u91cf\u3002<br \/>\u6240\u4ee5\u4f60\u5f97\u5148\u641e\u51fa\u4e2a\u5b8c\u6574\u7684\u5e26 namespace \u7684\u7c7b\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u518d\u53bb\u8c03\u7528\u3002\u7ed3\u679c\u5c31\u662f 2 \u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922862\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jswh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @jswh <br \/>\u52a8\u6001\u8bbf\u95ee\u662f\u57fa\u4e8e\u5b57\u7b26\u4e32\u7684\uff0c\u4f60\u53ef\u4ee5\u7b80\u5355\u7684\u7406\u89e3\u4e3a\u7f16\u8bd1\u5668\u4f1a\u5148\u628a\u5b57\u7b26\u66ff\u6362\u5230\u4ee3\u7801\u91cc\uff0c\u518d\u6267\u884c\u4ee3\u7801\uff0c<br \/>custom$custom[&#8216;module&#8217;],\u8fd9\u91cc\u7684\u95ee\u9898\u662f\u4e0d\u7b26\u5408\u8bed\u6cd5\u89c4\u8303\uff0cnamespace \u4e0d\u80fd\u540e\u63a5\u53d8\u91cf\u3002<br \/>\u6240\u4ee5\u4f60\u5f97\u5148\u641e\u51fa\u4e2a\u5b8c\u6574\u7684\u5e26 namespace \u7684\u7c7b\u540d\u7684\u5b57\u7b26\u4e32\uff0c\u7136\u540e\u518d\u53bb\u8c03\u7528\u3002\u7ed3\u679c\u5c31\u662f 2 \u3002<\/p>\n<p>&#8212;&#8212;-<br \/>\u7740\u6025\u4e0b\u73ed\uff0c\u4e00\u5806\u9519\u5b57                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922863\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rophie123 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             PHP \u725b\u903c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922864\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wjfz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             2 \u6b63\u89e3\u3002<br \/>\u6211\u4e4b\u524d\u662f\u8fd9\u4e48\u5f04\u7684\u3002<\/p>\n<p> $channelClass = &#8220;\\common\\services\\sms\\&#8221; . ucfirst($channel);<br \/> if (!class_exists($channelClass)) {<br \/> throw new NotFoundExceptions(&#8220;\u77ed\u4fe1\u53d1\u9001\u7c7b{$channelClass}\u4e0d\u5b58\u5728&#8221;);<br \/> }                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4922865\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zpfhbyx <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div> <img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/01\/20210114_5fffc67f667fa.png\" rel=\"noreferrer\" alt=\"\u5982\u4f55\u5b9e\u4f8b\u5316\u4e00\u4e2a\u6709\u547d\u540d\u7a7a\u95f4\u7684\u52a8\u6001\u7c7b\uff1f\u5982\u4e0b\u4ee3\u7801:\"> <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u5b9e\u4f8b\u5316\u4e00\u4e2a\u6709\u547d\u540d\u7a7a\u95f4\u7684\u52a8\u6001\u7c7b\uff1f&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/277595"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=277595"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/277595\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=277595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=277595"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=277595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}