PHP error not display

N

nesster13

I have installed Apache and PHP 5 on my machine.
I have use Smarty and Pear to help me with the general template of my
page. I was able to have a page loaded onto the my browser with not
error but when I intentionally create an error on the page a blank page
load with nothing on it. Does anybody know how to make the error come
out.

The code want to use to generate the error

require_once 'inexistent_file.php';

and since I dont have a file name inexistent_file.php an error should
be generated.

Sorry if the question is unclear. I am very new to php/apache and dont
really know how to put the question in a more formal way. Any help is
greatly appreciated. Thanks
 
J

John Timney \(MVP\)

require_once does not generate an exception, it raises an E_WARNING status
which is a nonfatal runtime error. This type of error does not halt the
script - hence you see no visible error. So you will need to evaluate the
return code of require_once and evaluate its success/or not.

Read up on PHP error handling here
http://www.informit.com/articles/article.asp?p=170279&rl=1

also. you'll typically get better responses in a PHP support group than one
for ASP.NET

Regards

John Timney (MVP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top