Simplify .htaccess and rename command line script

This commit is contained in:
Frederic Guillot
2016-11-29 20:22:41 -05:00
parent fdc4e04e87
commit 978a3c70fe
17 changed files with 91 additions and 316 deletions

18
cli Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env php
<?php
use Symfony\Component\EventDispatcher\Event;
if (php_sapi_name() !== 'cli') {
echo 'This script run only from the command line'.PHP_EOL;
exit(255);
}
try {
require __DIR__.'/app/common.php';
$container['dispatcher']->dispatch('app.bootstrap', new Event);
$container['cli']->run();
} catch (Exception $e) {
echo $e->getMessage().PHP_EOL;
exit(255);
}