找不到输入文件 symfony [英] Could not find input file symfony
问题描述
我能够生成包.但是我在使用 propel 构建模型时遇到了问题.我尝试了 php symfony propel:build-model
来生成模型,但它抛出错误 - 无法打开输入文件:symfony.php app/console cache:clear
对我来说很好用.我是否也必须为 symfony 设置环境变量.我在window 7 32位机器上.我正在使用 symfony2.任何建议都会对我很有帮助.
I am able to generate bundle. But I face problem when building model using propel. I tried php symfony propel:build-model
to generate model but it throws error - could not open input file: symfony. php app/console cache:clear
works fine for me. Will I have to set environmental variable for symfony too. I am on window 7 32bit machine. I am using symfony2. Any suggestion will be very helpful to me.
推荐答案
使用 php app/console propel:build-model
而不是 php symfony propel:build-model
.app/console
部分只是对 app
目录中的 console
文件的引用.该文件是 Symfony 应用程序中所有控制台命令的主要入口.
Use php app/console propel:build-model
instead of php symfony propel:build-model
. The app/console
part is just a reference to the console
file inside the app
directory. That file is the main entrance for all console commands in your Symfony application.
php
部分告诉控制台使用 php
命令来执行 app/console
文件和 propel:build-模型
是你执行的命令.
The php
part tells the console to use the php
command to execute the app/console
file and propel:build-model
is the command you execute.
来自评论:也不要忘记将包添加到 AppKernel::registerBundles
.
From the comments: Also don't forget to add the bundle to AppKernel::registerBundles
.
这篇关于找不到输入文件 symfony的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!