debug_fwrite

函式
debug_fwrite ( $fp, $message )
引數
  • (mixed) $fp Unused.
    Required:
  • (string) $message Message to log.
    Required:
相關
  • error_log()
定義位置
相關方法
debug_fopendebug_fclosedoing_filterwp_debug_modeadd_filter
引入
0.71
棄用
3.4.0

debug_fwrite: 這個函式將資料寫到一個開啟的檔案指標上。它經常用於除錯程式碼中,將除錯資訊或其他資訊寫到日誌檔案中。

向用於除錯的檔案寫入內容。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function debug_fwrite( $fp, $message ) {
_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
if ( ! empty( $GLOBALS['debug'] ) )
error_log( $message );
}
function debug_fwrite( $fp, $message ) { _deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' ); if ( ! empty( $GLOBALS['debug'] ) ) error_log( $message ); }
function debug_fwrite( $fp, $message ) {
	_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
	if ( ! empty( $GLOBALS['debug'] ) )
		error_log( $message );
}

常見問題

FAQs
檢視更多 >