Wie führen Sie einen Befehl als Befehlszeile aus einer Symfony-Funktion?Führen Sie einen Befehl als Befehlszeile aus einer Symfony-Funktion
z.
C:\SymfonyProject> php app/console my-command --option=my-option
Ich möchte diesen Befehl von einer Funktion ausführen. Mit diesem Befehl werden Dateien aus einer Datenbank exportiert und diese Dateien im Ordner "app/Resource/translations" von Symfony Project abgelegt.
I.e.
public function exportFiles(){ // I want to run command here. }
Vielen Dank! :)
Mögliches Duplikat [Wie kann ich symfony 2 Fahrbefehl von der Steuerung ausgeführt] (http://stackoverflow.com/questions/10497567/how-can-i-run- symfony-2-run-command-from-controller) – exxecc