3 require_once
'./libs/composer/vendor/autoload.php';
17 public function __construct($inspector, $file_path, $file_name)
19 $this->inspector = $inspector;
20 $this->file_path = $file_path;
21 $this->file_name = $file_name;
26 if (!is_dir($this->file_path)) {
43 $file_name = $this->file_path .
"/" . $this->file_name . self::FILE_FORMAT;
44 $stream = fopen($file_name,
'w+');
47 chmod($file_name, 0755);
67 return Formatter::formatExceptionPlain($this->inspector);
79 $ret .=
"\n\n-- $title --\n\n";
80 if (count($content) > 0) {
81 foreach ($content as
$key => $value) {
82 $key = str_pad(
$key, self::KEY_SPACE);
87 $indentation = str_pad(
"", self::KEY_SPACE);
88 $value = implode(
"\n", array_map(
function ($line) use (&$first, $indentation) {
93 return $indentation . $line;
94 }, explode(
"\n", print_r($value,
true))));
96 $ret .=
"$key: $value\n";
119 ,
"POST Data" =>
$post 123 ,
"Server/Request Data" =>
$server 124 ,
"Environment Variables" => $_ENV
137 if (isset($post[
"password"])) {
138 $post[
"password"] =
"REMOVED FOR SECURITY";
155 $cookie_content = $server[
"HTTP_COOKIE"];
156 $cookie_content = explode(
";", $cookie_content);
158 foreach ($cookie_content as
$key => $content) {
159 $content_array = explode(
"=", $content);
160 if (trim($content_array[0]) == session_name()) {
161 $content_array[1] = substr($content_array[1], 0, 5) .
" (SHORTENED FOR SECURITY)";
162 $cookie_content[
$key] = implode(
"=", $content_array);
166 $server[
"HTTP_COOKIE"] = implode(
";", $cookie_content);
static makeDirParents($a_dir)
Create a new directory and all parent directories.
pageHeader()
Get the header for the page.
__construct($inspector, $file_path, $file_name)
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
Saves error informations into file.
$stream
PHP stream implementation.
shortenPHPSessionId(array $server)
Shorts the php session id.
tablesContent()
Get the header for the page.
exceptionContent()
Get a short info about the exception.
Create styles array
The data for the language used.
tables()
Get the tables that should be rendered.
hidePassword(array $post)
Replace passwort from post array with security message.