问题
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 :-
- Go to shell folder which is in bin folder in cakephp 3.0.
- Click on batch file.
- 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:
- check with Powershell and type php-v if you see your version of php
- Install cake php bake https://book.cakephp.org/bake/1/en/index.html
- 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