简体   繁体   中英

Symfony2 bundle creating error

I am using windows system. I have just installed the symfony to my localhost as it is install with no error inside. bellow url run fine with browser.

http://localhost/symfony/web/app_dev.php

now i have tried to create bundle from command prompt with following syntax.

php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml

it shows an error like. " could not open input file ." however the environment variable is already set for command prompt. so can any one please help me create bundle or give another way to create bundle in symfony. Thanks.

What environment variable is set? Best thing is to run this command while you are in main project folder (in your case symfony folder).

Could not open input file.

implifies that app/console, does not exist. Make sure to run

cd path/to/your/symfony/folder

before trying to generate the bundle. :)

Run your command from your symfony root folder. Also try to do:

php app/console generate:bundle

it will ask you to specify a folder and format. Also that it needs to generate the structure. Also check that your php-cli.ini has all the necessary configurations to execute the code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM