本文介绍了Codeigniter + PhpBB函数重新声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我想整合phpbb到codeigniter。我不想让用户注册论坛。站点登录/注册控制器也应该处理论坛部分,所以我写一个ci库注册/登录到phpbb。I am trying to integrate phpbb to codeigniter. I don't want that the users register for the forum. Site login/register controllers should handle the forum part as well, so I am writing a ci library to register/login to phpbb.我得到一个错误,因为我已经包括我的ci库中的phpbb函数和库:I got an error because I have included phpbb functions and libraries inside my ci library:任何想法如何解决这个最快的方法?Any idea how to solve this quickest way?我在ci库中包含的phpbb文件是:phpbb files that I have included inside my ci library are: 包含/ functions_user.php 包含/ functions_modul.php推荐答案我会做的只是将PHPBB文件复制到CI application / 目录, /What I would do is just copy the PHPBB files to the CI application/ directory appropriately and then remove / rename the PHPBB functions as needed, while making them proper helpers or models. common.php 文件可以在需要时重命名PHPBB函数,可能在 application / helpers 中找到一个 phpbb_helper 的家,等等。The common.php file could probably find a home in application/helpers as phpbb_helper, and so on.你显然不能在核心的PHPBB安装中重命名函数,否则会破坏。同样,重命名常见的CI帮助程序函数会很糟糕,因为它会打破你使用spark和其他常用库的能力。You obviously can not rename functions in the core PHPBB installation or it will break. Likewise, renaming common CI helper functions would be bad because it would break your ability to use sparks and other common libraries.这不是快速,但应该如果你坐下来决心这样做,在几个小时内是可行的。并且,你最终得到体面的可重用的代码,不应该难以维护,所以你从来没有担心它。This isn't exactly 'quick', but should be workable in a couple of hours if you sat down determined to do it. And, you end up with decent reusable code that shouldn't be difficult to maintain so you never have to worry about it again. 这篇关于Codeigniter + PhpBB函数重新声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 05-28 00:53