function debug_fopen( $filename, $mode ) {}

Open the file handle for debugging.
This function is used for XMLRPC feature, but it is general purpose enough to be used in anywhere.


  • string $filename: File path to debug file.
  • string $mode: Same as fopen() mode parameter.

Return values

returns:File handle. False on failure.

Source code

function debug_fopen( $filename, $mode ) {

	global $debug;

	if ( 1 == $debug ) {

		$fp = fopen( $filename, $mode );

		return $fp;

	} else {

		return false;




No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: