控制台在 Windows 版 CakePHP 中找不到 Shell

发布于 2024-10-30 02:45:19 字数 1514 浏览 0 评论 0原文

我在 winows (XAMPP) 上获取蛋糕控制台以查看演示 shell 时遇到问题,

C:\xampp\htdocs\twitter\app\vendors\shells>dir


2011/03/31  21:11    <DIR>          .
2011/03/31  21:11    <DIR>          ..
2011/03/31  21:16               761 demo.php
2011/03/31  21:01    <DIR>          tasks
2011/03/31  21:01    <DIR>          templates

我的 shell 目录中有 demo.php shell。

C:\xampp\htdocs\twitter\app\vendors\shells>cake demo

Error: Class DemoShell could not be loaded.

但蛋糕控制台找不到它。

C:\xampp\htdocs\twitter\app\vendors\shells>cake


Welcome to CakePHP v1.3.7 Console
---------------------------------------------------------------
Current Paths:
 -app: shells
 -working: C:\xampp\htdocs\twitter\app\vendors\shells
 -root: C:\xampp\htdocs\twitter\app\vendors
 -core: C:\xampp\htdocs\twitter

Changing Paths:
your working path should be the same as your application path
to change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp

Available Shells:
 acl [CORE]                              i18n [CORE]

 api [CORE]                              schema [CORE]

 bake [CORE]                             testsuite [CORE]

 console [CORE]

To run a command, type 'cake shell_name [args]'
To get help on a specific command, type 'cake shell_name help'


C:\xampp\htdocs\twitter\app\vendors\shells>

并且控制台本身无法识别它。 (注意核心正在从正确的目录读取)。

这可能是一些愚蠢的疏忽,但知道我在这里做错了什么吗?

I'm having trouble getting the cake console on winows (XAMPP) to see the demo shell

C:\xampp\htdocs\twitter\app\vendors\shells>dir


2011/03/31  21:11    <DIR>          .
2011/03/31  21:11    <DIR>          ..
2011/03/31  21:16               761 demo.php
2011/03/31  21:01    <DIR>          tasks
2011/03/31  21:01    <DIR>          templates

I have the demo.php shell in the shell directory.

C:\xampp\htdocs\twitter\app\vendors\shells>cake demo

Error: Class DemoShell could not be loaded.

But the cake console couldn't find it.

C:\xampp\htdocs\twitter\app\vendors\shells>cake


Welcome to CakePHP v1.3.7 Console
---------------------------------------------------------------
Current Paths:
 -app: shells
 -working: C:\xampp\htdocs\twitter\app\vendors\shells
 -root: C:\xampp\htdocs\twitter\app\vendors
 -core: C:\xampp\htdocs\twitter

Changing Paths:
your working path should be the same as your application path
to change your path use the '-app' param.
Example: -app relative/path/to/myapp or -app /absolute/path/to/myapp

Available Shells:
 acl [CORE]                              i18n [CORE]

 api [CORE]                              schema [CORE]

 bake [CORE]                             testsuite [CORE]

 console [CORE]

To run a command, type 'cake shell_name [args]'
To get help on a specific command, type 'cake shell_name help'


C:\xampp\htdocs\twitter\app\vendors\shells>

And it isn't recognised by the console itself. (note the core is reading from the correct directory).

It's probably some silly oversight but any idea what I am doing wrong here?

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

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

发布评论

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

评论(2

So要识趣 2024-11-06 02:45:19

您应该从应用程序文件夹中调用 Cake [shell name]:C:\xampp\htdocs\twitter\app\>cake demo

请告诉我是否有效。

You should call cake [shell name] from within the app folder: C:\xampp\htdocs\twitter\app\>cake demo.

Please let me know if it works.

幻想少年梦 2024-11-06 02:45:19

阅读错误,它没有说“找不到文件”,而是说“找不到类”,因此您似乎在 demo.php shell 中错误地命名了该类

错误:无法加载类 DemoShell。这是一个关于它应该是什么的提示

Read the error, it does not say 'file not found' it says 'class not found' so it would seem you have named the class incorrectly inside your demo.php shell

Error: Class DemoShell could not be loaded. that is a hint as to what it should be

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