How to Log Errors in PHP | PHP Error Reporting and Debugging for Beginners | Log Website Errors

preview_player
Показать описание
Today I will teach you how to log website errors using PHP, in order to show error messages in a better looking way, instead of directly inside the browser. 🙂 Showing PHP errors inside the browser is not a good security practice, and luckily we can do it in a smarter way, where only the developer can see them!

➤ GET ACCESS TO MY LESSON MATERIAL HERE!

First of all, thank you for all the support you have given me!

I am really glad to have such an awesome community on my channel. It motivates me to continue creating and uploading content! So thank you!

I am now using Patreon and YouTube Memberships to share improved and updated lesson material, and for a small fee you can access all the material either from my memberships or Patreon, depending on your preference. I have worked hard, and done my best to help you understand what I teach.

I hope you will find it helpful :)

Рекомендации по теме
Комментарии
Автор

Learning so much from you! 😄 Watching from Philippines!

ricamiguel
Автор

I learnt php from you also learn oop php from an for about 2 years now have keep learning things from you... keep it up bro. i will click the join button soon. By God grace and also be a sponsor

africtv
Автор

Dani my man!! I don't know if you realized, but the way you talk by using your hands makes your tutorials more fun and interactive. I never get bored!! I wish my college professors used this method of teaching. Your Thumbnails as well... so catchy!!

kgaugelomashitoa
Автор

You are just so good Dani. Kindly extend the signup system to a comment system please

peterochekpo
Автор

Awesome content would be great to do a video on the useful PHP extensions in apps such as visual studio code and sublime etc. Maybe even WordPress.

rigoltee
Автор

Ohhhh Dani Dani, you are truly amazing

kqxvfdc
Автор

thank you so much for making such an amazing video. ❤❤❤❤❤❤

vimleshdcafe
Автор

Hi Dani, nice tuts! can we do something like this for fatal errors? thanks

PechSoftware
Автор

Great tutorial, thank you! Newbie question: if I have a main PHP script that calls (e.g. require_once) a few other PHP scripts, should this error reporting code be used in each PHP script, or is it sufficient to use it only on the main script?

mikeh
Автор

ive got a multiple file upload and i want to echo or add a class to the image that will be uploaded if it is too large how can i pin point the element that has a large image uploaded thank you

chopbar
Автор

Hi Dani, do we include this code in each page of a website? BTW, thank you for your awesome tutorials!

paulfowler
Автор

Hie Danni would you kindly do for us a PDO and Composer course please

mmelimahlobo
Автор

I would like Episode, thank you so much....

simsolchannel
Автор

Hie Danni may we have more projects in OOP please

Thank you😊

mmelimahlobo
Автор

Hi dani
i have try your code. but error messages dont store on my file.

mahdavi
Автор

Hey Dani sir! could you make an updated JS tutorial also🙏

TheNextTechG
Автор

I got everything you said and it's greatly explained but, what if the error was not an "undelcared variable error", but a fatal error like that one where you tried to divide by 0? Can that error also be handled by our custom error handler? If yes, how? I tried and it just goes on display and nothing is logged in the file

iosifpuha
Автор

Just to note: Whenever logging into a file, it is important to have your errors in JSON format for later when you need the data structured or used in an interface

stephenokoduwa
Автор

Hello master, can you do something on Laravel Framework?😢. It’s well much required nowadays

deitunegold
Автор

I'm sorry, I've followed the tutorial to the letter, but it still does not write the errors in the error_log.txt file. I wonder if I'm missing anything? I'm also using XAMPP while learning PHP.

elenacarbonell