fix inscriptos csv

This commit is contained in:
German Correa 2018-10-17 18:12:42 -03:00
parent 44d4fb341d
commit e204f612a7

View File

@ -61,7 +61,8 @@ $app->get('/program', function (Request $request, Response $response, array $arg
});
$app->get('/inscriptos', function(Request $request, Response $response, array $args){
exec('sqlite3 -header -csv ../db/ggdworkshop.db "select * from registro" > "inscriptos.csv"');
$dbfile = $this->settings['db']['path'];
exec('sqlite3 -header -csv '.$dbfile.' "select * from registro" > "inscriptos.csv"');
$file = 'inscriptos.csv';
$fh = fopen($file,"rb");
$stream = new \Slim\Http\Stream($fh);