debug_fwrite

Write contents to the file used for debugging.

Description

debug_fwrite( (mixed) $fp, (string) $string ); 

Parameters (2)

0. $fp (mixed)
The fp.
1. $string (string)
Message to log.

Usage

  1. if ( !function_exists( 'debug_fwrite' ) ) { 
  2. require_once ABSPATH . WPINC . '/deprecated.php'; 
  3.  
  4. // The fp. 
  5. $fp = null; 
  6.  
  7. // Message to log. 
  8. $string = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = debug_fwrite($fp, $string); 
  12.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/deprecated.php  
  1. function debug_fwrite( $fp, $string ) { 
  2. _deprecated_function( __FUNCTION__, 'error_log()' ); 
  3. if ( ! empty( $GLOBALS['debug'] ) ) 
  4. error_log( $string );