for some reason my debug is not working outside of the zend ide i will post the code here
thanks in advanced
leon pegg
<?php # index.php
include("class/debug.php");
include("class/template.php");
$from = 0;
while ($from < count($module)) {
$core[$module[$from]] = $module[$from]();
$from = $from + 1;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>php class manager</title>
<script type="text/javascript">
var djConfig = {isDebug: false};
</script>
<script type="text/javascript" src="./dojo/dojo.js"></script>
<script language="JavaScript" type="text/javascript">
dojo.require("dojo.widget.FloatingPane");
</script>
</head>
<body>
<div dojoType="FloatingPane"
title="PHP Debug"
constrainToContainer="true"
hasShadow="false"
resizable="true"
displayMinimizeAction="false"
displayMaximizeAction="true"
contentWrapper="none"
style="min-width: 300px; min-height: 200px; width: 300px; height: 200px; top: 100px; left: 400px;"
<?php
$core['debug']->show_debug($core , $module );
?>
</div>
</body>
</html>
<?php # debug class
class debug_class {
var $author = "Leon Pegg";
var $email = "**@**.**";
var $description = "This class maintains debug infomation";
var $debug;
function debug_class(){
$this->debug("Debug Class created");
set_error_handler(array(&$this, 'handler'));
}
function debug($message) {
$this->debug[count($this->debug)] = $message;
}
function handler($no, $str, $file, $line, $ctx) {
$this->debug( 'level ' . $no . ' error ' . $str .' in file ' . $file .' on line ' . $line);
}
function show($from = 0){
while ($from < count($this->debug)) {
echo "<strong>".$from." :</strong> ".$this->debug[$from]."<br/>\n";
$from = $from + 1;
}
}
function show_debug($core, $module){
$from = 0;
while ($from < count($module)) {
echo "<strong>Debug Record :</strong> ".$module[$from]." class<br/><br/>\n";
$core[$module[$from]]->show();
echo "<br/>\n";
$from = $from + 1;
}
}
function about(){
echo "About Debug Class\n";
echo "Author : ".$this->author."\n";
echo "E-Mail : ".$this->email."\n";
echo "Description :\n".$this->description."\n";
}
}
$module[count($module)] = "debug";
function debug(){
$debug = new debug_class();
return $debug;
}
?>
<?php # template class
class template_class {
var $author = "Leon Pegg";
var $email = "**@**.**";
var $description = "this is a template class";
var $debug;
function template_class(){
$this->debug('Template Class created');
set_error_handler(array(&$this, 'handler'));
}
function debug($message) {
$this->debug[count($this->debug)] = $message;
}
function handler($no, $str, $file, $line, $ctx) {
$this->debug( 'level ' . $no . ' error ' . $str .' in file ' . $file .' on line ' . $line);
}
function show($from = 0){
while ($from < count($this->debug)) {
echo "<strong>".$from." :</strong> ".$this->debug[$from]."<br/>\n";
$from = $from + 1;
}
}
function about(){
echo "About Template Class\n";
echo "Author : ".$this->author."\n";
echo "E-Mail : ".$this->email."\n";
echo "Description :\n".$this->description."\n";
}
function gendebug(){
$i = 0;
while ($i < 20 ){
$this->debug($i );
$i = $i +1;
}
}
}
$module[count($module)] = "template";
function template(){
$data = new template_class();
return $data;
}
?>