Elgg
Version 2.3
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
docs
examples
advanced
exceptions.php
Go to the documentation of this file.
1
<?php
2
16
// notify some important people that a problem has occurred
17
// remember we can't rely on the database being available so everything here
18
// should be hard coded
19
$emails
= array(
20
'admin@example.com'
,
21
'expert@example.com'
22
);
23
24
$url
= $_SERVER[
'HTTP_HOST'
] . $_SERVER[
'REQUEST_URI'
];
25
$subject
=
"Exception: $url"
;
26
$message
=
$exception
->getMessage();
27
28
foreach
(
$emails
as
$email
) {
29
mail($email,
$subject
,
$message
);
30
}
31
32
33
// output a custom error page to match the theme or give a custom message
34
$html
= <<<HTML
35
<
html
>
36
<
body
>
37
Oops,
a
problem occurred. The authorities have been notified.
38
Sorry
for
the inconvenience.
39
</
body
>
40
</
html
>
41
HTML;
42
43
// any output will prevent the default views from rendering allowing
44
// this script to control the entire page output
45
echo
$html
;
$message
$message
Definition:
exceptions.php:26
$subject
$subject
Definition:
exceptions.php:25
a
a
Definition:
admin.css.php:97
html
html
Definition:
admin.css.php:36
$email
$email
Definition:
register.php:15
$url
$url
Definition:
exceptions.php:24
$exception
$exception
Definition:
admin_exception.php:12
$emails
$emails
This is an optional script used to override Elgg's default handling of uncaught exceptions.
Definition:
exceptions.php:19
$html
foreach($emails as $email) $html
Definition:
exceptions.php:34
echo
elgg echo
Translates a string.
Definition:
languages.js:48
body
body
Definition:
admin.css.php:36
Generated on Sat Dec 21 2024 00:01:03 for Elgg by
1.8.11