Reputation:
I want to save errors of each date in txt file using PHP.. and I also want to name those txt file by its date .. eg ERROR-LOG 19-08-2022 I want to save my website every day error log in txt file ..which SHALL BE GENERATED FOR EVERY 24 HRS
I KNOW HOW TO MAKE ERROR LOG but m getting stuck . because as per the requirement I want to make error log for each date which shall be generated in txt file and shall be named as per the date . I am newbie into programmming so will highly appreciate your support ...
date_default_timezone_set("Asia/Kolkata");
ini_set('display_errors',1);
ini_set('log_errors',1);
ini_set('error_log',dirname(__FILE__).'/p.txt');
error_reporting(E_ALL);
// my code for generating error log ..now all errors are getting displayed in p.txt . but I do not want that I want errors to be generated for each date ...IN Separate txt file
Upvotes: 0
Views: 66