Source for file source.php
Documentation is available at source.php
* Created on 27 avr. 2006
* This an exemple of showsource file
* It uses the Pear package Text_Highligth
* /!\ Don't forget to securise this script /!\
// Additional include path for Pear (to adapt to your configuration )
require_once '../../config/ApplicationCfg.php';
//Include Debug_Renderer_HTML_Table_Config to get the configuration
require_once 'Debug.php';
require_once 'Debug/Renderer/HTML_Table_Config.php';
//Include the class definition of highlighter
require_once 'Text/Highlighter.php';
require_once 'Text/Highlighter/Renderer/Html.php';
// Get View source configuration
//Debug::dumpVar($options, '$options');
// Buil the array options for the HTML renderer to get the nice file numbering
'numbers' => $options['HTML_TABLE_view_source_numbers'],
'tabsize' => $options['HTML_TABLE_view_source_tabsize'],
// Finish parser object creation
$renderer = new Text_Highlighter_Renderer_Html($rendOptions);
$phpHighlighter = Text_Highlighter::factory("PHP");
$phpHighlighter->setRenderer($renderer);
// Now make output, header
$header = str_replace('<title>PEAR::PHP_Debug</title>', '<title>PEAR::PHP_Debug::View_Source::'. $_GET['file']. '</title>', $options['HTML_TABLE_simple_header']);
print ($options['HTML_TABLE_view_source_stylesheet']);
<span class="hl-title">'.
print ($options['HTML_TABLE_simple_footer']);
|