CakePHP 默认烘焙路径 :: 可以更改吗?

发布于 2024-10-14 14:29:33 字数 185 浏览 7 评论 0原文

我最近从实时服务器下载了一个蛋糕网站,我正在尝试烘焙一些方面。但我收到文件未找到错误(即使它们确实存在),但其结构与开箱即用的 CakePHP 下载不同。所以我想知道我是否错过了所有这些要点,或者有一个简单的方法来调整 CLI 在路径方面寻找的内容 - 即 ACL 模式的 config/ 就是我想要解决的问题。感谢您的任何建议。从事这个已经有一段时间了。

I recently downloaded a Cake site from a live server, and I am trying to bake some aspects. But I am getting files not found errors (even though they do exist), but the structure is different that the out-of-box CakePHP download. So I am wondering if I am missing the point on all this, or there is a simple way to adjust what the CLI looks for in terms of paths - namely the config/ for an ACL schema is what I am trying to crunch out.. Thanks for any advice. Been at this for a while now.

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

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

发布评论

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

评论(3

(り薆情海 2024-10-21 14:29:33

您可能会幸运地查看 paths.php 配置文件。它位于 /cake/config/paths.php 中。我不确定它是如何工作的,但它可能会引导你走向正确的方向。

You might have some luck looking at the paths.php config file. It's in /cake/config/paths.php . I'm not positive how it works but it might lead you in the right direction.

芸娘子的小脾气 2024-10-21 14:29:33

好吧,我本来可以做一些完全像僵尸一样的事情,但我决定重新烘焙并将原始 MVC 文件复制到新的烘焙文件夹(使用新的配置模式文件夹),但现在问题已经通过这样做解决了。

Well I could have been doing something totally zombie-like, but I decided just to re-bake and copy my original MVC files to the new baked folders (used the new config schema folder), but the issue is now resolved by doing that.

鸠书 2024-10-21 14:29:33

想法1:

也许这太简单了,但是你确定你正在正确地运行bake吗?您应该为烘焙设置一个环境变量,或者在应用程序文件夹中输入烘焙的完整路径。这里有更多详细信息: http://book.cakephp.org/view/1106 /The-CakePHP-Console

注意:

$ cd /my/cake/app_folder
$ ../蛋糕/控制台/蛋糕

这将打开你的蛋糕提示,并且还应该解决丢失的路径。

想法2:
由于非常规文件名、类名等,蛋糕中的路径丢失也可能发生......即使您的应用程序正在运行,其他事情也可能不喜欢测试、任务或烘焙。示例:在插件中,如果您实际上遵循标准并将模型附加到类名中,则需要在控制器中添加 $uses 。如果一切都没有定义,测试也会因此停止。

想法3:
我之前在 app/index.php 和 app/webroot/test.php 中更改了蛋糕位置的路径,也许您可​​以在这些文件之一中进行相同的烘焙操作,但由于它位于 cake/console 中,您可能需要从该文件夹中的某个位置执行此操作。在修改蛋糕文件夹之前,我会确保分叉蛋糕,以便您仍然可以轻松地提取更新而无需覆盖您的更改。

Idea 1:

Perhaps this is too simple, but are you sure you are running bake correctly? You should setup a environment variable for bake, orrr type the full path of bake while you are in your app folder. There are more details here: http://book.cakephp.org/view/1106/The-CakePHP-Console

Note:

$ cd /my/cake/app_folder
$ ../cake/console/cake

That will open up your cake prompt and should also resolve missing paths.

Idea 2:
Missing paths in cake can also occur as a result of non-conventional filenames, classnames etc... even if your app is working other things may not like testing, tasks, or bake. Example: in plugins if you actually follow the standard and append model to the class name, you need to then have $uses in your controller. Testing also brakes as a result if everything isn't defined.

Idea 3:
I have changed the path for my cake location before in app/index.php and app/webroot/test.php perhaps you could do the same for bake in one of those files, but since it is in cake/console you may need to do it from somewhere in that folder. Before you modify they cake folder, I would make sure to fork cake, so that you can easily still pull updates without over writing your changes.

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