本文整理匯總了PHP中DOMPDF_memory_usage函數的典型用法代碼示例。如果您正苦於以下問題:PHP DOMPDF_memory_usage函數的具體用法?PHP DOMPDF_memory_usage怎麽用?PHP DOMPDF_memory_usage使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DOMPDF_memory_usage函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: write_log
/**
* Writes the output buffer in the log file
* @return void
*/
private function write_log()
{
if (!DOMPDF_LOG_OUTPUT_FILE || !is_writable(DOMPDF_LOG_OUTPUT_FILE)) {
return;
}
$frames = Frame::$ID_COUNTER;
$memory = DOMPDF_memory_usage();
$memory = number_format($memory / 1024);
$time = number_format((microtime(true) - $this->_start_time) * 1000, 2);
$out = "<span style='color: #000'>{$frames} frames</span>\t" . "<span style='color: #900'>{$memory} KB</span>\t" . "<span style='color: #090'>{$time} ms</span>\t" . "<span style='color: #009' title='Quirksmode'>" . ($this->_quirksmode ? "<span style='color: #c00'>ON</span>" : "<span style='color: #0c0'>OFF</span>") . "</span><br />";
$out .= ob_get_clean();
file_put_contents(DOMPDF_LOG_OUTPUT_FILE, $out);
}
示例2: write_log
/**
* Writes the output buffer in the log file
*
* @return void
*/
private function write_log()
{
$log_output_file = $this->get_option("log_output_file");
if (!$log_output_file || !is_writable($log_output_file)) {
return;
}
$frames = Frame::$ID_COUNTER;
$memory = DOMPDF_memory_usage() / 1024;
$time = (microtime(true) - $this->_start_time) * 1000;
$out = sprintf("<span style='color: #000' title='Frames'>%6d</span>" . "<span style='color: #009' title='Memory'>%10.2f KB</span>" . "<span style='color: #900' title='Time'>%10.2f ms</span>" . "<span title='Quirksmode'> " . ($this->_quirksmode ? "<span style='color: #d00'> ON</span>" : "<span style='color: #0d0'>OFF</span>") . "</span><br />", $frames, $memory, $time);
$out .= ob_get_clean();
$log_output_file = $this->get_option("log_output_file");
file_put_contents($log_output_file, $out);
}
示例3: write_log
/**
* Writes the output buffer in the log file
* @return void
*/
private function write_log()
{
if (!DOMPDF_LOG_OUTPUT_FILE || !is_writable(DOMPDF_LOG_OUTPUT_FILE)) {
return;
}
$memory = DOMPDF_memory_usage();
$memory = number_format($memory / 1024);
$time = number_format((microtime(true) - $this->_start_time) * 1000, 4);
$out = "<span style='color: #900'>{$memory} KB</span> " . "<span style='color: #090'>{$time} ms</span><br />";
$out .= ob_get_clean();
file_put_contents(DOMPDF_LOG_OUTPUT_FILE, $out);
}