当前位置: 首页>>代码示例>>PHP>>正文


PHP eZDebug::writeEror方法代码示例

本文整理汇总了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);
开发者ID:jjohnsen,项目名称:jaj_newsletter,代码行数:31,代码来源:track.php

示例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();
}
开发者ID:runelangseid,项目名称:ezpublish,代码行数:24,代码来源:pdf.php


注:本文中的eZDebug::writeEror方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。