本文整理汇总了PHP中eZDebug::writeEror方法的典型用法代码示例。如果您正苦于以下问题:PHP eZDebug::writeEror方法的具体用法?PHP eZDebug::writeEror怎么用?PHP eZDebug::writeEror使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZDebug
的用法示例。
在下文中一共展示了eZDebug::writeEror方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gmdate
<?php
$object_id = $Params['object_id'];
$uuid = $Params['uuid'];
$operation = $Params['operation'];
$delivery = jajNewsletterDelivery::fetchByObjectIdAndUUID($object_id, $uuid);
if (is_object($delivery)) {
$delivery->markAsOpened();
if ($operation == 'view') {
$delivery->markAsViewed();
}
}
$image = 'extension/jaj_newsletter/design/standard/images/logo.gif';
if (!file_exists($image)) {
eZDebug::writeEror("Image for tracking doesn't exist", 'jaj_newsletter::newsletter::track');
return;
}
ob_clean();
header('Pragma: ');
header('Cache-Control: ');
/* Set cache time out to 10 seconds, this should be good enough to work around an IE bug */
header("Expires: " . gmdate('D, d M Y H:i:s', time() + 10) . ' GMT');
header('X-Powered-By: eZ Publish');
header('Content-Length: ' . filesize($image));
header('Content-Type: image/gif');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
ob_end_clean();
$fp = @fopen($image, 'r');
@fpassthru($fp);
fclose($fp);
示例2: contentPDFPassthrough
function contentPDFPassthrough($cacheFile)
{
$file = eZClusterFileHandler::instance($cacheFile);
if (!$file->exists()) {
eZDebug::writeEror("Cache-file for pdf doesn't exist", 'content::pdf::contentPDFPassthrough');
return;
}
$file->fetch(true);
ob_clean();
header('Pragma: ');
header('Cache-Control: ');
/* Set cache time out to 10 seconds, this should be good enough to work around an IE bug */
header("Expires: " . gmdate('D, d M Y H:i:s', time() + 10) . ' GMT');
header('X-Powered-By: eZ Publish');
header('Content-Length: ' . $file->size());
header('Content-Type: application/pdf');
header('Content-Transfer-Encoding: binary');
header('Accept-Ranges: bytes');
ob_end_clean();
$fp = @fopen($cacheFile, 'r');
@fpassthru($fp);
fclose($fp);
eZExecution::cleanExit();
}