Reputation: 122
I want to execute a Commandline by using the CakePHP-CLI. I want to build a function that executes another application using the command-Line. I cant find anything useful in the Documentation. Did someone else got that issue before?
Thanks alot.
EDIT
I have created a CLI-Class called Database where already are some database synchronising functions in there. Now I want to use an external Tool called "Liquibase". Which is executed using a Commandline. Like
java -jar liquibase.jar -parameter1 -parameter2
The problem is have no idea how to execute such a command-line out of CakePHP-CLI.
I tried this
$this->runCommand("echo 'test'");
but the output isn't displayed.
Upvotes: 0
Views: 350
Reputation: 1330
runCommand
is only intended for running (cake) shell / task methods, see. If want to execute external commands use something like exec
, see.
Upvotes: 1