How to create a logfile in PHP

This quick tutorial help to create logging functionality in your PHP application using core PHP code.You don’t need any php library or any plugin.

There is general requirement of any application, how to catch the logging information into your application.your application is running and accidentally it will down. How can you get what will problem occurred in your code and what was caused to fail system, by help of log file you can get any problem and information what happened in your application.

Creating logging in php application is very easy.You just need to create a single log.php file use it any where in application do you need.

Source code to log errors and warnings into a file in php

how to call use log function in your application