[ Index ]
 

Code source de SugarCRM 5.0.0beta1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/XTemplate/ -> debug.php (source)

   1  <?php
   2  
   3  function dump_vars() {
   4      global $_POST, $_GET;
   5      echo "<br><h2>POST_VARS:</h2><br>\n";
   6      while (list($var, $value) = each($_POST)) {
   7          echo "<b>$var</b> = [$value]<br>\n";
   8      }
   9      echo "<br><h2>GET_VARS:</h2><br>\n";
  10          while (list($var, $value) = each($_GET)) {
  11              echo "<b>$var</b> = [$value]<br>\n";
  12      }
  13      echo "<br><br>";
  14  }
  15  
  16  function dump_array(&$mit,$indent="") {
  17      while (list($key, $value) = each($mit)) {
  18          if (gettype($value)=="array") {
  19                  echo "<br>".$indent."<font face='verdana,helvetica' size=1><b>[$key]</b> =";
  20                  echo " ARRAY<br>\n".$indent."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[</font><br>\n";
  21          dump_array($value,$indent."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
  22                  echo $indent."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;]<br>\n";
  23              } else {
  24              echo $indent."<font face='verdana,helvetica' size=1><b>[$key]</b> =";
  25              echo " [".htmlspecialchars($value)."]</font><br>\n";
  26          }         
  27      }
  28  }
  29  
  30  function timer($stime,$etime)
  31  {
  32      $stime=split(" ",$stime);
  33      $etime=split(" ",$etime);
  34      return $etime[0]+$etime[1]-$stime[0]-$stime[1];
  35  }
  36  
  37  function debuglog($mit)
  38  {
  39   global $release;
  40   if ($release=="dev")
  41       error_log(date("[G:i:s] ").$mit,3,"/tmp/php3-ibusz.log");
  42  }
  43  
  44  ?>


Généré le : Tue Sep 11 10:48:47 2007 par Balluche grâce à PHPXref 0.7