diff --git a/src/routes.php b/src/routes.php index 4bafcfc..5f12a4c 100644 --- a/src/routes.php +++ b/src/routes.php @@ -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);