phpDocumentor PHP_Debug
[ class tree: PHP_Debug ] [ index: PHP_Debug ] [ all elements ]

INSTALL

+-----------------------------------------------------------------------------+
+-- PHP_Debug : A simple and fast way to debug your PHP code                  |
+--                                                                           |
+-- Support : Vernet Loic (qrf_coil@yahoo.fr)                                 |
+-----------------------------------------------------------------------------+
 
 
== Installations instructions ==================================================


Installation of view source fonctionnality

	- Include the class in your php file. ("Debug.php")

	- Things to do in order that the view source functionnality works, 
		copy "source.php" in a directory

	- Install Pear, check Pear website : http://pear.php.net</a>
	
	- Install Pear::Text_Highlight
	
	- Line 15/16 add Pear to your PHP include path, or add the Pear directory 
		in the include path directly in your php.ini file

	- Then the script in "source.php" should work

	- When you create your PHP_Debug object, don't forget to setup the path 
	  of the view source path, default is "./source.php"


== Hello world ! script : "debug_test_min_xhtml.php" ===========================

<?php
/**
 * Mini Tutorial
 * 
 * @package PHP_Debug
 * @filesource
 */ 

print('<?xml version="1.0" encoding="UTF-8"?>');

?>

<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">     
  <head>  
    <title>PHP_Debug :: Hello World !!</title>
    <style type="text/css">
    body {
        background-color:#FFFFFF;
        padding:1px;
        margin:1px;
    }
    img {
        border-width:0 0 0 0;
    }    
  
<?php
/**
 * Include Debug Class
 */ 
include_once('Debug.php');


$Dbg = new Debug();

/**
 * Generate StyleSheet  
 */
require_once 'Debug.php';
require_once 'Debug/Renderer/HTML_Table_Config.php';

$htmlOptions = Debug_Renderer_HTML_Table_Config::singleton()->getConfig();

// Get PHP_Debug stylesheet and print it
print($htmlOptions['HTML_TABLE_stylesheet']); 

?>
    </style>
  </head>
  <body>
  <div>
    <a href="http://validator.w3.org/check/referer">
       <img src="/05 - PHP_Debug/images/vxhtml10.png" alt="Valid XHTML 1.0!" height="31" width="88" />
    </a>     
  </div>
  
<?php

print("<div><h1>PHP_Debug :: Hello World !!</h1></div>");
print("<div><h2>This page is XHTML 1.0 strict compliant.</h2></div>");

$Dbg->add('DEBUG INFO');

$Dbg->display();

?>

  </body>
</html>


== Full example ================================================================

see "index.php"



Documentation generated on Thu, 07 Sep 2006 00:36:08 +0200 by phpDocumentor 1.3.0