From e204f612a71e76d5a4e06e241421e7c083c6199e Mon Sep 17 00:00:00 2001 From: German Correa Date: Wed, 17 Oct 2018 18:12:42 -0300 Subject: [PATCH] fix inscriptos csv --- src/routes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);