Advertisements

debug_fopen

Definition:
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.

Parameters

  • 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;

	}

}

776

Advertisements

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:

WordPress.com Logo

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

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: