Welcome Guest, Not a member yet? Register   Sign In
Debug PHP errors
#1

[eluser]Unknown[/eluser]
Hi!

I just started to explore the world and wonders of CodeIgniter and already found a stop:

How do I track errors/typos in my PHP code in either my controllers or views?

Consider this simple controller:

Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Welcome extends CI_Controller {
       public function index()
        {
this_is_nonsense,no code
                $this->load->view('welcome_message');
        }
}
?>

Look at the "this_is_nonsense,no code". It should lead to an error. What I receive is just an empty web page.
In my index.php, i did set
Code:
define('ENVIRONMENT', 'development');

I config.php, i did set
Code:
$config['log_threshold'] = 4;

The log file under "logs" doesn't reveal anything helpful, just logs initializing of classes.

The same applies to errors and typos in views or templates.

What I'm doing wrong?







Messages In This Thread
Debug PHP errors - by El Forum - 07-31-2013, 06:14 AM
Debug PHP errors - by El Forum - 07-31-2013, 07:42 AM
Debug PHP errors - by El Forum - 07-31-2013, 10:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB