Elgg  Version 4.3
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_plugin_hook('diagnostics:report', 'system', null, $output);
11 
12 header("Cache-Control: public");
13 header("Content-Description: File Transfer");
14 header('Content-disposition: attachment; filename=elggdiagnostic.txt');
15 header("Content-Type: text/plain");
16 header('Content-Length: ' . strlen($output));
17 
19 exit();
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition: languages.php:18
elgg_trigger_plugin_hook($hook, $type, $params=null, $returnvalue=null)
Definition: elgglib.php:380
elgg echo
Translates a string.
Definition: deprecated.js:530
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