将第 3 方 PHP 类添加到 Zend Framework
我是 Zend 框架的新手。我正在尝试将 TCPDF 与我的控制器集成,以便我可以即时生成 PDF。我想将整个 TCPDF 文件夹放在 library/tcpf 中(而不是现在所在的公共文件夹)并运行应用程序,但我似乎无法让 Zend 查看并使用它。我通读了加载器文档,但仍然很困惑。请帮忙。
问候, 陈乔恩
I am new to Zend Framework. I am trying to integrate TCPDF with my controller so that I can generate PDFs on the fly. I'd like to put the entire TCPDF folder in library/tcpf (instead of the public folder where it is now) and have the application run but I dont seem to be able to get Zend to see it and use it. I read through the loader documentation but I'm still confused. Help please.
Regards,
Joe Chin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定 Zend_Loader 是否会对您有太大帮助,因为 TCPDF 似乎只有一个类,并且不遵循 PEAR 风格的类命名约定。因此,如果我是你,我会按照你的建议将其全部提取到library/tcpf中,然后在需要时只需要在library/tcpdf/tcpdf.php中。
I'm not sure if Zend_Loader will help you too much here as TCPDF appears to only have one class and does not follow the PEAR style class naming conventions. So if I were you I'd extract it all into library/tcpf as you suggested and then just require in library/tcpdf/tcpdf.php when you need it.