Home » CodeIgniter » CodeIgniter with firePHP – FireBug Extension

CodeIgniter with firePHP – FireBug Extension

Sponsored

Codeigniter FirePHP -

Codeigniter FirePHP -

Fire Bug

A Stunning Extension for web developers who using Mozila Firefox. With firebug you can do Live Debugging.

View and locate HTML Source elements.

View Css Files included.

View Javascript files. More View and Run and Debug Functions with watch and break facility.

View Errors in HTTP request.

Track The Time to load a website.

And Much More

You can download this extension free from firebug’s website

Fire PHP

A Powerfull extension for FireBug.

Can Handle php echos into a container.

Easly handle errors,notices,messages from the serverside code.

Can Print Arrays, Variables, Object Dumps and more …

You can get firePHP Free

And Fire Your Code …………

CodeIgniter

Open source PHP Application framework from ellislab (creaters of Expression engine).

Documented from top to bottom

Learn and use very easly

Use Model View Controller MVC Architechture

Framework with Light Fast and Small Memory Footprint – Best for shared Hosting Accounts

A framework that requires nearly zero configuration.

A framework with good community support and free applications like open blog.

The Problem is we cannot print messages,errors directly into the applications interface. Sometime CodeIgniter will suppress your echo command.

FirePHP handle these message excellent. To use firePHP with codeigniter you want to integrate theĀ  FirePHP Core Library (download it) to your codeigniter application.

extract the FirePHP.class.php from the archive, rename it to firephp.php and copy in the system/application/libraries directory of your CodeIgniter application

Now you can use FirePHP to debug your codeigniter Application:

  • load the library into your controller : $this->load->library('firephp')
  • send debug messages to the FireBug console : $this->firephp->log($myvariable) or $this->firephp->error('Error at this line')
  • A More Detailed instruction about FirePHP is in the website

    • $this->firephp->log($myvariable) : send a dump of the variable $myvariable on the FireBug console
    • $this->firephp->warn($myvariable) : send a dump of the variable $myvariable on the FireBug console classified as a warning
    • $this->firephp->error($myvariable) : send a dump of the variable $myvariable on the FireBug console classified as an error

    Here there is a little example:

    <?php
        $this->load->library('firephp');
        $myvariable = array (
          'language' => 'PHP',
          'database' => 'MySQL',
          'blogging platform' => 'WordPress',
          'post' => 'CodeIgniter and FirePHP',
        );
        $this->firephp->log($myvariable);
    ?>
    
    

    The debug messages can be disabled with the method : $this->firepgp->setEnabled(FALSE).

    And this is the output

    FirePHP Consile

    FirePHP Consile

    Sponsored

    I am a Full stack Web Developer. I'm interested in Web Designing and passionate towards FOSS. I love Linux and like to promote it. A quick leaner, quick implementer, not away from errors, staying for software and knowledge freedom and doing programming in PHP, Mysql, Postgresql, Laravel, Angulajs and more..

    1 Comment

    1. I use Fire Bug. The tool is very helpful in developing php applications.

    Leave a Reply

    Your email address will not be published. Required fields are marked *