When developing complex snippets, I follow the recommendation to create the snippet in an external file. When I do it that way, however, I can’t see PHP errors such as syntax issues one pageload; if there are any parsing problems, bad function calls, etc., I am left staring at a white screen trying to imagine what I could have done wrong.
This makes development very difficult.
1. Is there a way to display errors from an included snippet?
2. If not, how do you other developers deal with it?
Thanks.
Jason
-
☆ A M B ☆
- 24,524 Posts
Set error logging on, and specify a log file, at the top of the .php file.
-
☆ A M B ☆
- 2,475 Posts
PHP error reporting is set in the php.ini file, among other places. You have to customize it on each server... e.g. my dev server has full error reporting enabled.