maj syntaxe accolades, maj jQuery, correction layout contact
[mtweb] / web / app / init / 0100_functions.php
index 06f135d..061cef9 100644 (file)
@@ -1,7 +1,9 @@
 <?php
 
-  function debug($content)
-  { echo "<pre class=\"debug\">\n".htmlentities(print_r($content, true))."\n</pre>\n";
+  function debug($content){
+    echo PHP_SAPI == "cli" ?
+      "\n".print_r($content, true)."\n"
+    : "<pre class=\"debug\">".htmlentities(print_r($content, true), ENT_QUOTES, "UTF-8")."</pre>";
   }
 
 ?>
\ No newline at end of file