How do I get the Bake console for CakePHP?

半腔热情 提交于 2020-12-15 06:08:20

问题


I am having trouble getting the Bake console.

I am on Windows running XAMPP.

I'm doing the IBM CakePHP tutorial.

Here is my directory:

C:\
  xampp
     htdocs
        ibm2 (a test project - orginally called cakephp)
          app
          cake
          vendors
          (etc)

It says to use Bake,

cd into the /webroot/app directory and launch the Cake Console: ../cake/console/cake bake. You should be presented with a screen that looks like Figure 2.

So I write in my command prompt till I am at:

C:\xampp\htdocs\ibm2\app>

Then I type

../cake/console/cake bake

but I get this error:

'..' is not recognized as an internal or external command, operable program or batch file.

What am I doing wrong? I use the Windows command prompt


回答1:


Take a look at Setting Up the CakePHP Console on Windows screencast.




回答2:


start the command prompt:

type cd\ press enter and then cd:/xampp/php press enter php.exe C:/xampp/htdocs/cakeblog/lib/cake/console/cake.php bake press enter




回答3:


This trick works for me :-

  1. Go to shell folder which is in bin folder in cakephp 3.0.
  2. Click on batch file.
  3. After it open cmd and set path to your folder like cd xampp/htdocs/test and then enter bake commands



回答4:


In cakephp 3.X bake and windows environment with wamp server you should have yet php environment variable active:

  1. check with Powershell and type php-v if you see your version of php
  2. Install cake php bake https://book.cakephp.org/bake/1/en/index.html
  3. no need to install cakephp environmetn variable only go to the root folder on your project and type: PS C:\wamp64\www\yourcakephp3.x_project>bin/cake bake



回答5:


first check bake command in command prompt if it gives the out put not recognized as internal or external command than first add environment variable correctly than cake bake will work correctly



来源:https://stackoverflow.com/questions/2992676/how-do-i-get-the-bake-console-for-cakephp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!