开发者

(Doctrine-Ubuntu) Get error: doctrine-cli.php: command not found

(Doctrine-Ubuntu) I run $ doctrine-cli.php command and get doctrine-cl开发者_Python百科i.php: command not found. P


What's the exactly command you're executing? It should be something like this:

php doctrine-cli.php COMMAND

Also php should be available under PATH system variable but in Ubuntu (if you installed PHP by package installer) that's done by default.


Do this in the command line if you just want to execute it:

chmod +x doctrine-cli.php

and optionally

cp doctrine-cli.php doctrine

this way you can do

./doctrine-cli.php [arguments]

and if you did the optional step you can do

./doctrine [arguments]

and if you don't want the ./ do this

export PATH=$PATH:/full/path/to/doctrine/folder

so now you can execute the doctrine command from any folder

What this does is adds the 'execute' permission to the file. If you have a proper shebang on the top of the file everything should execute fine (I imagine it does) and optionally adds the doctrine folder to your PATH so you can execute it from anywhere

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜