Welcome Guest, Not a member yet? Register   Sign In
how to display errors?
#1

[eluser]pck76[/eluser]
Hi All,

I've managed to update mamp php.ini to display all errors (E_ALL), and also CI error level is set to 4.

This way I'm able to see php errors, but don't see html errors. How can I solve this?

for example, my view contains
Code:
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title><?php echo $title; ?></title>
    <link href="<?= base_url();?>css/default.css" rel="stylesheet" type="text/css" /> <!-- wrong location -->

I can see the page title appearing correctly, but then the page stops processing and i get a blank page.

a) why is it stopping?
b) why doesn't it say something like "error, can't locate file css/default.css ??

thanks,
P.
#2

[eluser]n0xie[/eluser]
Did you change the error level in your index.php to E_ALL?
#3

[eluser]flaky[/eluser]
load the URL helper in the contructor
Code:
$this->load->helper('url');

and check that you have short tags enabled

instead of
Code:
<?= base_url();?>
[\code]

change it to this

[code]
<?php echo base_url();?>
#4

[eluser]pck76[/eluser]
Thanks Flaky, you were right - I hadn't loaded the URL helper!

Still, I wasn't able to realize this in chrome, as it wasn't showing no errors; I've checked with safari, and that was showing an error that made me understand..
#5

[eluser]skunkbad[/eluser]
You know, I use a custom error handler hook in all of my applications. If you are on the development server, you get to see the errors, and if you are on the production server, then it emails you the errors. It's worth checking out.




Theme © iAndrew 2016 - Forum software by © MyBB