81898

请问control应该怎么扩展?

回帖
回帖数 5
阅读数 3628
发表时间 2013-01-22 17:20:30
🎾
潘超楼主

我在模块my中增加一个扩展功能,放在my/ext/control目录中,control文件为helloworld.php,代码如下:

<?php

include '../../control.php';

class helloworldMy extends my

{

    public function helloworld($account = '')

    {

        $this->display();

    }

}

访问页面my-helloworld.html时却在日志文件中收到错误,说my模块中找不到helloworld方法,除非把这个方法直接写到my模块的control.php中才行。

ERROR: the module my has no helloworld method in I:\xampp\zentao\framework\router.class.php on line 1101, ..........

2013-01-22 17:23:46 潘超 最后编辑
5个回复
2013-01-23 07:49:59 王春生 回帖
🎾
潘超板凳
试了几次终于明白了,原来类名中必须包含继承control的类名,谢谢
2013-01-23 09:33:14 潘超 回帖
有两种哦, 别光暴力测试, 细心看下文档
2013-08-20 18:46:43 风起 回帖
为什么不能看 扩展文档啊,说没有权限
2015-05-23 09:43:42 liu 回帖
网址已经转移了:http://devel.easycorp.cn/book/extension.html
2015-05-25 10:21:56 王春生 回帖
联系我们
联系人
丁芝/高级客户经理
电话(微信)
17663906485
QQ号码
1481227768
联系邮箱
dingzhi@chandao.com
相关帖子
返回顶部
客服头像
丁芝
高级客户经理
客服微信
17663906485
1481227768
统一服务热线 4006-8899-23
我要提问提问有任何问题,您都可以在这里提问。问题反馈反馈点击这里,让我们聆听您的建议与反馈。