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
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!!
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
Use "json encode" built in function to encode your object or associative array which will then be in a json string format, then send it to a text file using "file_set_contents" function.@@joaolira3217
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?
I don't know too , but you can make different file for errors and require_once to each page you want , if the code not work for every pages. I hope make sense. ❤
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
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.
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
You can handle fatal error in a separate function and register it using register_shutdown_function("your fatal error handler function"); You can get the fatal error message with error_get_last() which returns an array containing the error number, message, file and line.
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
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!!
Thanks! ☺
true
Learning so much from you! 😄 Watching from Philippines!
Ohhhh Dani Dani, you are truly amazing
thank you so much for making such an amazing video. ❤❤❤❤❤❤
You are just so good Dani. Kindly extend the signup system to a comment system please
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.
Nicely done. Thanks Buddy
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
That's such a smart idea! Thanks for the tip
How do you do that?
Use "json encode" built in function to encode your object or associative array which will then be in a json string format, then send it to a text file using "file_set_contents" function.@@joaolira3217
Great video!
Very helpful, thank you :-)
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?
Just write it once and require it in your other scripts.
Hi Dani, do we include this code in each page of a website? BTW, thank you for your awesome tutorials!
I have the same question. thanks in advance
I don't know too , but you can make different file for errors and require_once to each page you want , if the code not work for every pages. I hope make sense. ❤
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
will this work for PDO mysqli error for eg . database is duplicate, table exist already .....etc all types of uncaught exception
Hi Dani, nice tuts! can we do something like this for fatal errors? thanks
How to add ad costume text that I want into a with blank page. So not just showing a white page only, Sir?
very good
I know many peeps who can catch my life errors without try catch, but that's ok, I can handle that
I would like Episode, thank you so much....
Thanks IT Mr. Beast
Hey Dani sir! could you make an updated JS tutorial also🙏
you just have subscriber
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.
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
You can handle fatal error in a separate function and register it using register_shutdown_function("your fatal error handler function");
You can get the fatal error message with error_get_last() which returns an array containing the error number, message, file and line.
Hi dani
i have try your code. but error messages dont store on my file.
Hie Danni may we have more projects in OOP please
Thank you😊
Thank u 👍
Hie Danni would you kindly do for us a PDO and Composer course please
I would add that you can't output large text data through error_log as it will crash
But what if user opens yourdomain/error_log.txt
Hello master, can you do something on Laravel Framework?😢. It’s well much required nowadays
nice.
Cool🔥
I need to download by php
Does this mean I should feel good about getting errors now that they are pretty 😂
😂😂 but at the end of project i can see the error message lines is more then my codes lines 🤣🤣
😂😂😂😂😂@@sbhankord8591
👍🙏