From the course: PHP Essential Training
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Warnings and errors - PHP Tutorial
From the course: PHP Essential Training
Warnings and errors
- [Instructor] When we encounter an error in our code, the more information that we have about that error, the easier it's going to be to resolve it. In this movie, we'll look at the warnings and errors that PHP generates and learn how they can help you to resolve problems. The first and most important thing is to make sure that error reporting is turned on. We can't deal with our errors if we can't see them. So we want to make sure that PHP is reporting errors as they happen to us when we're in development. There are two ways to do this. The first is that we can set the error reporting in the php.ini file. And we saw how to do that back in the configuration chapter. You just edit your php.ini file to have display errors on, error reporting equal to whatever settings we want to have for that, and then restart our web server so it reloads that php.ini file. We can also set the error reporting on-the-fly in our PHP code.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.