Cakephp 2.1 naming convensions issue in version change(Cakephp 2.1 版本更改中的命名约定问题)
问题描述
我刚刚安装了 CakePHP 2.1.只是看到它的命名约定与旧版本相比发生了很大变化,这让我抓狂.
I have just installed CakePHP 2.1. And just see that the naming convention of its is just change lot from the older version which making me crazy.
就像是 app/controllers
而现在是 app/Controller
一样
Like it was app/controllers
while now it is app/Controller
same way
app/models
- app/Model
app/views
- app/View
我知道这样做一定有一些优势.但我的问题是,当我使用蛋糕烘焙时,它会以同样的旧方式创建目录,即 controllers/models/views
.从 URL & 无法再访问哪个显然会抛出错误.
I know there must be some advantage on doing this. But my problem is when I use the cake bake it is creating directory in the same old fashion i.e. controllers/models/views
. Which is no more accessible from the URL & obviously will throw an error.
有人遇到同样的问题吗?有没有什么解决方案可以让蛋糕烘焙也使用相同的约定?
Is anyone there who has face the same issue ? Is there any solution that cake bake also use the same conventions ?
任何帮助将不胜感激.谢谢.
Any help will be appreciate. Thanks.
推荐答案
你总是可以使用显式路径:
you can always use explicit paths:
/path/to/app_dir>..libCakeConsolecake bake
来自当前蛋糕项目的 APP 目录.这是万无一失的,并且始终适用于正确的蛋糕版本.
from your APP dir of the current cake project. this is foolprove and always works with the right cake version.
我这样做并使用键盘上的快捷方式在一次击键时打印(最多蛋糕").
I do it this way and use a shortcut on my keyboard to print this (up to "cake") on a single key stroke.
这篇关于Cakephp 2.1 版本更改中的命名约定问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:Cakephp 2.1 版本更改中的命名约定问题
基础教程推荐
- 在多维数组中查找最大值 2021-01-01
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01