Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function dev_log( $log_data ) {
- $log_file_name = "log";
- if ( ! file_exists( $log_file_name ) ) {
- mkdir( $log_file_name, 0777, true );
- }
- $log_file_data = $log_file_name . '/log_' . date( 'd-M-Y' ) . '.log';
- file_put_contents( $log_file_data, $log_data . "\n", FILE_APPEND );
- }
- //For wordpress developers: put this function into your plugin or theme (functions.php) and call it to test your data
Add Comment
Please, Sign In to add comment