LeeTee
LeeTee

Reputation: 6601

PHP classes and error messaging

I am quite new to OOP and classes. One thing I am struggling with is that if there are errors within a method of a class, no error messaging is displayed, the page just breaks. Does anyone know why this is or how I can get this to display errors?

Upvotes: 1

Views: 951

Answers (1)

Levi Hackwith
Levi Hackwith

Reputation: 9332

http://us.php.net/manual/en/function.error-reporting.php

Put this at the top of the page that includes your class.

<?php
error_reporting(E_ALL);
?>

Upvotes: 1

Related Questions