cakephp admin 設定
新版的 Cakephp 的 core.php 中多了滿多東西。
其中有個
/**
* Uncomment the define below to use cake built in admin routes.
* You can set this value to anything you want.
* All methods related to the admin route should be prefixed with the
* name you set CAKE_ADMIN to.
* For example: admin_index, admin_edit
*/
// define('CAKE_ADMIN', 'admin');
只要設定了這個後,就可以使用 http://domain/admin/controller/action 去呼叫
controller 中的 admin_action 作為 管理用的 action .[@more@]
其中有個
/**
* Uncomment the define below to use cake built in admin routes.
* You can set this value to anything you want.
* All methods related to the admin route should be prefixed with the
* name you set CAKE_ADMIN to.
* For example: admin_index, admin_edit
*/
// define('CAKE_ADMIN', 'admin');
只要設定了這個後,就可以使用 http://domain/admin/controller/action 去呼叫
controller 中的 admin_action 作為 管理用的 action .[@more@]






迴響
您好!
我也要学cake,看到您的资料,我也配了一下
http://192.168.0.1/index.php/edit/accounts
这个行
http://192.168.0.1/edit/accounts
这个行不行
不知怎么能去掉index.php?
望给我回信帮助!
thanks!
關於你說得要去掉 index.php ,照理說,他應該預設是跑 mod_rewrite 的方式執行的,所以應該可以不用有 index.php ....
另外就是你的 core.php 的設定中,
##define ('BASE_URL', env('SCRIPT_NAME'));
必須是註解起來的,不然他就會跑有 index.php 的模式喔。
你沒有留 email 我怎麼回信給你呢∼
//define ('BASE_URL', env('SCRIPT_NAME'));
LoadModule rewrite_module modules/mod_rewrite.so
也用了,还是不行,望帮忙!
MSN:JitZhang@hotmail.com
我近日手头上有个小网站,客户要求用cakePHP framework开发,这我不会,
所以请您帮忙,作为我的cakePHP framework指导老师:
A、提供一个模块 cakePHP framework 代码及演示说明 (如常用的新闻或用户管理系统模块)
B、在开发过程中,若有疑问,给您mail,或MSN或QQ进行指点
C、辅导时间二周
D、给您适当的辅导费用
望能帮忙,请及时回复!
顺祝
商祺!
张光荣(Jit Zhang)
电话:021-28683821 手机:13661667071
MSN:JitZhang@hotmail.com 工作QQ:20816465
請確認一下你的 apache 是否有開啟 AllowOverride All
若是沒有,怎要打開來∼
你是自己架設主機還是租用虛擬主機呢?
AllowOverride All
打开了,
在是公司PC上构架的
查了很多资料,就是不知怎么能去掉index.php?