From the course: Learning PHP
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Common PHP errors
- [Instructor] While some errors can be clear, others can be pretty cryptic. Here are a few that you'll probably come across and what they really mean. The first is a failed to open stream warning. This happens when you have an include statement to a file that doesn't exist. You'll want to check to make sure that you don't have any typos and that you know you're in the right directory. In this case, the variable. Now, if we refresh the page, that error is gone, but it's replaced by another error. Warning, cannot modify header information, headers are already sent. This one is actually less common because recent versions of PHP offer a buffer, but it's a bit of a head scratcher. Basically the header directive or function allows you to send headers about the file. That's information about the file. One thing that you can do is redirect in PHP using the location directive. So, this should say location index.php,…
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.