/** * Affiche un contenu dans un div et avec des infos sur le fichier appelant * * @param string $pContent Contenu à afficher. */ private static function _outputFormatted(&$pContent) { if (!headers_sent()) { @header("Content-Type: text/html;charset=UTF-8"); } echo '<div style="border: solid #CC0000 1px; color: black; padding: 5px; text-align: left; cursor: default; align: left; background-color: white; whitespace: preserve; overflow: auto">'; $caller = self::getCaller(); list($prefix, $file) = CopixFile::getCopixPathPrefix($caller['file']); if ($prefix) { $file = $prefix . DIRECTORY_SEPARATOR . $file; } echo '<div style="width:100%; background-color:#CC0000; color: white; padding-top: 5px; padding-bottom: 5px; margin-bottom: 5px; font-weight: bold; text-align: center;">'; printf("From %s, line %d :", htmlentities($file), $caller['line']); echo '</div>'; echo '<pre>'; echo $pContent; echo '</pre>'; echo '</div>'; }