TP5 \think\Loader @流年

浏览:3366 发布日期:2016/11/21 分类:求助交流
解决了,我饿不知道是不是正确的方法:写成model("notice/NoticeDataLogic", "logic") 就好了,全部都pass 通过。。。@流年,,老大要是你看见这贴,麻烦你回复一下,这么解决是不是正确跨模块调model方法的方式。

目录:
application
---captcha
-------contoller
-----------sms.php
---notice
-------logic
-----------sendLogic.php

========================================

在 sendLogic.php 里面的 send方法中有这么一句

\think\Loader::model("NoticeDataLogic", "logic")->ok(..........);

========================================

访问notice模块,全部OK Pass通过。

但是访问captcha就会把上面这句给报错,因为captcha模块 sms.php 调用了 sendLogic.php 里面的 send方法;

提示:【类不存在:app\common\logic\NoticeDataLogic】

========================================

请问这句要怎么写,既能在自己所属模块中使用,也支持其他模块调用正常。。
最佳答案
评论( 相关
后面还有条评论,点击查看>>