问题描述
是否有可能让Tank-Auth在CodeIgniter中作为一个软件包工作?
我将数据库模式安装到我的MySQL数据库中,并复制了tank_auth的所有文件夹appthird_partyfolder[CI] \application\third_party\tank_auth。屏幕截图:
会话工作正常。
我可以加载tank_auth模型
$ this-> load-> model('tank_auth / users');
我可以加载tank_auth视图
$ this-> load-> view('auth / login_form');
但我无法访问auth和welcome控制器。我的应用程序显示一个404.我的日志文件没有404以外的警告或错误。
有什么想法吗?
Simon
我发现在CI doc为什么它不工作,如何正确地修复:
你可以只放在资源,而不是控制器。然后我将控制器(auth和welcome)移动到我的CI应用程序/ controllers文件夹。一切正常。
Is it possible to get Tank-Auth working as a package in CodeIgniter?
I installed database schema into my MySQL database and copied all the folders of tank_auth in my app "third_party" folder "[CI]\application\third_party\tank_auth". The Screenshot :
Session works fine.
I can load tank_auth models
$this->load->model('tank_auth/users');
I can load tank_auth views
$this->load->view('auth/login_form');
But i can't access "auth" and "welcome" controllers. My application shows a 404. My log files has no warning or error other that the 404.
Any idea?
Simon
I found out in CI doc why it doesn't work and how to fix it properly : Here (section Application "Packages")
You can put there ressources only, not controllers. I then moved the controllers (auth and welcome) to my CI application/controllers folder. Everything works now.
这篇关于使用CodeIgniter Tank-Auth作为包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!