Skip to content

Instantly share code, notes, and snippets.

@kressaty
Last active December 16, 2015 00:29
Codeigniter helper function utilizing Chrome PHP log feature
<?php
// You must include the PHP file from here for this to work: https://github.com/ccampbell/chromephp
// In Codeigniter, simply save the PHP file in the "Libraries" directory
function consolelog($stuff)
{
if(ENVIRONMENT == 'production')
{
return;
}
include_once APPPATH.'libraries/ChromePhp.php';
ChromePhp::log($stuff);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment