information de debug style


/ Published in: CSS
Save to your folder(s)

//////////////////////////////////////////////////////////
function debug($ch,$force=false) {
global $debugphp,$iphost,$ch_debug;

$ip=getenv('REMOTE_ADDR');

if ((($debugphp==true)||($force==true))&&(in_array($ip, $iphost))) {
ob_start();
var_dump($ch);
$dump=ob_get_clean();
$ch_debug.=$dump."\n";
}
}


Copy this code and paste it in your HTML
  1. .debug{ background-color: #FFFFFF; border-radius: 10px 10px 10px 10px; box-shadow: 3px 3px 3px #CCCCCC; top: 5px;left: 5px; overflow: hidden; padding: 5px; position: fixed; width: 30px;height: 30px; z-index: 1000; }
  2.  
  3. {%if ch_debug %}
  4. <div class='debug'>
  5. <img src="/img/firebug.png"/>
  6. {{ch_debug}}
  7. </div>
  8. {%endif%}

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.