cakephp 烘焙控制台表现得很奇怪?

发布于 2024-12-12 20:14:25 字数 1268 浏览 0 评论 0原文

我对 CakePHP 还很陌生,我正在从新手到专业人士浏览 CakePHP 的 Cake Book 和 Apress Book CakePHP,但我似乎无法理解我的烘焙控制台上发生了什么。

我已经安装了它并且似乎工作正常。但是,当我输入 cake cake 时,它会向我显示这一点,

Welcome to CakePHP v2.0.0 Console
--------------------------------------------------------------------
App: htdocs
Path: W:\xampp\htdocs\
--------------------------------------------------------------------
What is the path to the project you want to bake?
[W:\xampp\htdocs\myapp] >

而不是书本上所说的内容,

---------------------------------------------------------------
App : app
Path: /path-to/project/app
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
>

如果我按照蛋糕控制台上的问题进行操作,它会询问我想要复制的目录布局的路径,然后似乎覆盖了我用那个骨架所拥有的一切。

另一方面,如果我按照本书的步骤并输入 cake cake viewcake cake model ,它似乎明白我正在谈论名为 view 和 model 的项目,并且告诉我这些项目没有数据库配置等。所以,如果我先输入项目路径,我就无法选择要做什么。但如果我忽略它,它就无法知道。看看这是怎么回事?

我使用的是常规 Windows cmd.exe,而不是我见过一些人推荐的 cygwin,并且可以根据需要提供更多详细信息。可能有一个简单的解决方案,所以我感谢您的帮助!

I'm pretty new to CakePHP and i'm running through both the Cake Book and the Apress Book CakePHP from novice to professional, but i can't seem to understand what's going on on my bake console.

I've got it installed and seems to work fine. But when i type in cake bake it shows me this

Welcome to CakePHP v2.0.0 Console
--------------------------------------------------------------------
App: htdocs
Path: W:\xampp\htdocs\
--------------------------------------------------------------------
What is the path to the project you want to bake?
[W:\xampp\htdocs\myapp] >

instead of what the books say it should be

---------------------------------------------------------------
App : app
Path: /path-to/project/app
---------------------------------------------------------------
Interactive Bake Shell
---------------------------------------------------------------
[D]atabase Configuration
[M]odel
[V]iew
[C]ontroller
[P]roject
[F]ixture
[T]est case
[Q]uit
What would you like to Bake? (D/M/V/C/P/F/T/Q)
>

if i follow the questions on my cake console, it asks me the path to the directory layout i wish to copy, and then seems to override everything i have with that skel one.

on the other hand, if i follow the book's steps and type cake bake view or cake bake model it seems to understand that i'm talking about projects named view and model and tell me there's no database configuration for those projects, etc. So, if i type the project path first, i don't get to choose what to do. But if i leave it out, it has no way of knowing. See where this is going?

I'm using the regular Windows cmd.exe, not cygwin as i've seen some people recommending, and can provide more detail if needed. There's probably an easy solution for this, so I appreciate your help!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

找个人就嫁了吧 2024-12-19 20:14:25

你走错了路。
如果你想烘焙内部东西(模型、控制器、视图……)等
您需要导航到应用程序文件夹并在那里执行 cake
(或使用 -app 定义您的应用程序路径)

Windows 的详细信息和热门提示:
http://www.dereuromark.de/tag/cake-console-windows/

you are in the wrong path.
If you want to bake internal stuff (models, controllers, views, ...) etc
you need to navigate to the app folder and execute cake there
(or define your app path with -app)

details and hot tip for windows:
http://www.dereuromark.de/tag/cake-console-windows/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文