SAND-framework/console/bin.php
Emmanuel ROY d29e57ba2b repositionnement du bin.php pour les commandes
ajout de pages sur le template polo (docs,about,cgu)
modification du fichier de bdd
2020-12-08 08:47:44 +01:00

18 lines
No EOL
497 B
PHP

#!/usr/bin/php
<?php
//var_dump($argv);
if(isset($argv[1])) {
$option = explode(':', $argv[1]);
$command_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "command" . DIRECTORY_SEPARATOR . $option[0] . ".class.php";
if (is_file($command_file)) {
require $command_file;
$class = $option[0];
$static_method = $option[1];
$class::$static_method();
} else {
print "Command not found !\n";
}
}else{
print "No command was specified !\n";
}