3 require_once
'./libs/composer/vendor/autoload.php';
16 public function __construct($inspector, $file_path, $file_name) {
17 $this->inspector = $inspector;
18 $this->file_path = $file_path;
19 $this->file_name = $file_name;
23 if(!is_dir($this->file_path)) {
30 .$this->exceptionContent()
31 .$this->tablesContent()
38 $file_name = $this->file_path.
"/".$this->file_name.self::FILE_FORMAT;
39 $stream = fopen($file_name,
'w+');
40 fwrite($stream, $this->
content());
42 chmod($file_name, 0755);
60 return Formatter::formatExceptionPlain($this->inspector);
71 $ret .=
"\n\n-- $title --\n\n";
72 if (count($content) > 0) {
73 foreach ($content as $key => $value) {
74 $key = str_pad($key, self::KEY_SPACE);
79 $indentation = str_pad(
"", self::KEY_SPACE);
80 $value = implode(
"\n", array_map(
function($line) use (&$first, $indentation) {
85 return $indentation.$line;
86 }, explode(
"\n", print_r($value,
true))));
88 $ret .=
"$key: $value\n";
111 (
"GET Data" =>
$_GET 112 ,
"POST Data" => $post
116 ,
"Server/Request Data" =>
$server 117 ,
"Environment Variables" => $_ENV
129 if(isset($post[
"password"])) {
130 $post[
"password"] =
"REMOVED FOR SECURITY";
146 $cookie_content = $server[
"HTTP_COOKIE"];
147 $cookie_content = explode(
";", $cookie_content);
149 foreach ($cookie_content as $key => $content) {
150 $content_array = explode(
"=", $content);
151 if(trim($content_array[0]) == session_name()) {
152 $content_array[1] = substr($content_array[1], 0, 5).
" (SHORTENED FOR SECURITY)";
153 $cookie_content[$key] = implode(
"=", $content_array);
157 $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.
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.