Elgg  Version 6.1
download.php
Go to the documentation of this file.
1 <?php
6 // generating report could take some time
7 set_time_limit(0);
8 
9 $output = elgg_echo('diagnostics:header', [date('r'), elgg_get_logged_in_user_entity()->getDisplayName()]);
10 $output = elgg_trigger_event_results('diagnostics:report', 'system', [], $output);
11 
12 return elgg_download_response($output, 'elggdiagnostic.txt', false, [
13  'Content-Type' => 'text/plain; charset=utf-8',
14 ]);
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition: languages.php:17
elgg_trigger_event_results(string $event, string $type, array $params=[], $returnvalue=null)
Triggers an event where it is expected that the mixed return value could be manipulated by event call...
Definition: events.php:117
elgg_download_response(string $content, string $filename= '', bool $inline=false, array $headers=[])
Prepare a download response.
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:24
$output
Definition: download.php:9