Slim Application Error

The application could not run because of the following error:

Details

Type: ErrorException
Code: 2
Message: Cannot modify header information - headers already sent by (output started at /home/timotheejd/www/api/ASNcrash/functions.php:690)
File: /home/timotheejd/www/api/ASNcrash/functions.php
Line: 580

Trace

#0 [internal function]: Slim\Slim::handleErrors(2, 'Cannot modify h...', '/home/timotheej...', 580, Array)
#1 /home/timotheejd/www/api/ASNcrash/functions.php(580): header('Content-Type: t...')
#2 /home/timotheejd/www/api/ASNcrash/index.php(57): export_csv(-1)
#3 [internal function]: {closure}()
#4 /home/timotheejd/www/api/Slim/Route.php(468): call_user_func_array(Object(Closure), Array)
#5 /home/timotheejd/www/api/Slim/Slim.php(1357): Slim\Route->dispatch()
#6 /home/timotheejd/www/api/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#7 /home/timotheejd/www/api/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#8 /home/timotheejd/www/api/Slim/Middleware/PrettyExceptions.php(67): Slim\Middleware\MethodOverride->call()
#9 /home/timotheejd/www/api/Slim/Slim.php(1302): Slim\Middleware\PrettyExceptions->call()
#10 /home/timotheejd/www/api/ASNcrash/index.php(94): Slim\Slim->run()
#11 {main}