thinkphp5.0 跨模塊調用代碼

thinkphp按模塊區分代碼,想要跨模塊調用代碼(好比logic)。php

例如在application下有兩個模塊 wx ,web,每一個模塊下都有controller,view,logic等等。想要在web/controller/Index.php 裏調用wx/logic/WxLogic.phpweb

<?php
...

class Index{
   public function index(){
       //wxlogic
       $wxLogic=model('wx/WxLogic','logic');
       ...
       ...
   }
}
相關文章
相關標籤/搜索