spirit posteets tagged debug  [ Profile ]

Sort by: Date / Title /

  1. 8 years ago
    1. function walkDom($node, $level = 0) {
    2.         $indent = '';
    3.         for ($i = 0; $i < $level; $i++)
    4.         $indent .= '&nbsp;&nbsp;&nbsp;&nbsp;'; //prettifying the output
    5.         if (true /*$node->nodeType == XML_TEXT_NODE*/) {
    6.                 echo $indent.'<b>'.$node->nodeName.'</b> - |'.$node->nodeValue.'|';
    7.  
    8.                 if ( $node->nodeType == XML_ELEMENT_NODE ) {
    9.                         $attributes = $node->attributes; // get all the attributes(eg: id, class)
    10.                         foreach($attributes as $attribute) {
    11.                                 echo ', '.$attribute->name.'='.$attribute->value;
    12.                         }                                                    
    13.                 }
    14.  
    15.                 echo '<br />';
    16.         }
    17.  
    18.         $cNodes = $node->childNodes;
    19.         if (count($cNodes) > 0) {
    20.                 $level++ ; // go one level deeper
    21.                 foreach($cNodes as $cNode)
    22.                         walkDom($cNode, $level);
    23.                 $level = $level - 1;
    24.         }
    25. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2092"></script>
  2. 9 years ago
    1. # Add this line to your "vhost"
    2.  
    3. fastcgi_param DEBUG "uri=$uri request_uri=$request_uri
    4.                                   request_filename=$request_filename query_string=$query_string is_args=
    5.                                   $is_args document_uri=$document_uri document_root=$document_root args=
    6.                                   $args fastcgi_script_name=$fastcgi_script_name path_info=$path_info script=$script";
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2007"></script>

First / Previous / Next / Last / Page 1 of 1 (2 posteets)