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


PHP phpThumb::DebugMessage方法代码示例

本文整理汇总了PHP中phpThumb::DebugMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP phpThumb::DebugMessage方法的具体用法?PHP phpThumb::DebugMessage怎么用?PHP phpThumb::DebugMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在phpThumb的用法示例。


在下文中一共展示了phpThumb::DebugMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: dirname

    if (include_once dirname(__FILE__) . '/phpThumb.config.php') {
        // great
    } else {
        ob_end_flush();
        $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
    }
    ob_end_clean();
} elseif (file_exists(dirname(__FILE__) . '/phpThumb.config.php.default')) {
    $phpThumb->ErrorImage('Please rename "phpThumb.config.php.default" to "phpThumb.config.php"');
} else {
    $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
}
if (!@$PHPTHUMB_CONFIG['disable_pathinfo_parsing'] && (empty($_GET) || isset($_GET['phpThumbDebug'])) && !empty($_SERVER['PATH_INFO'])) {
    $_SERVER['PHP_SELF'] = str_replace($_SERVER['PATH_INFO'], '', @$_SERVER['PHP_SELF']);
    $args = explode(';', substr($_SERVER['PATH_INFO'], 1));
    $phpThumb->DebugMessage('PATH_INFO.$args set to (' . implode(')(', $args) . ')', __FILE__, __LINE__);
    if (!empty($args)) {
        $_GET['src'] = @$args[count($args) - 1];
        $phpThumb->DebugMessage('PATH_INFO."src" = "' . $_GET['src'] . '"', __FILE__, __LINE__);
        if (preg_match('/^new\\=([a-z0-9]+)/i', $_GET['src'], $matches)) {
            unset($_GET['src']);
            $_GET['new'] = $matches[1];
        }
    }
    if (preg_match('/^([0-9]*)x?([0-9]*)$/i', @$args[count($args) - 2], $matches)) {
        $_GET['w'] = $matches[1];
        $_GET['h'] = $matches[2];
        $phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "' . $_GET['w'] . '"x"' . $_GET['h'] . '"', __FILE__, __LINE__);
    }
    for ($i = 0; $i < count($args) - 2; $i++) {
        @(list($key, $value) = explode('=', @$args[$i]));
开发者ID:CrazyBobik,项目名称:allotaxi.test,代码行数:31,代码来源:phpThumb.php

示例2: dirname

    if (include_once dirname(__FILE__) . '/phpThumb.config.php') {
        // great
    } else {
        ob_end_flush();
        $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
    }
    ob_end_clean();
} elseif (file_exists(dirname(__FILE__) . '/phpThumb.config.php.default')) {
    $phpThumb->ErrorImage('Please rename "phpThumb.config.php.default" to "phpThumb.config.php"');
} else {
    $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
}
if (!@$PHPTHUMB_CONFIG['disable_pathinfo_parsing'] && (empty($_GET) || isset($_GET['phpThumbDebug'])) && !empty($_SERVER['PATH_INFO'])) {
    $_SERVER['PHP_SELF'] = str_replace($_SERVER['PATH_INFO'], '', @$_SERVER['PHP_SELF']);
    $args = explode(';', substr($_SERVER['PATH_INFO'], 1));
    $phpThumb->DebugMessage('PATH_INFO.$args set to (' . implode(')(', $args) . ')', __FILE__, __LINE__);
    if (!empty($args)) {
        $_GET['src'] = @$args[count($args) - 1];
        if (eregi('^new\\=([a-z0-9]+)', $_GET['src'], $matches)) {
            unset($_GET['src']);
            $_GET['new'] = $matches[1];
        }
    }
    if (eregi('^([0-9]*)x?([0-9]*)$', @$args[count($args) - 2], $matches)) {
        $_GET['w'] = $matches[1];
        $_GET['h'] = $matches[2];
        $phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "' . $_GET['w'] . '"x"' . $_GET['h'] . '"', __FILE__, __LINE__);
    }
    for ($i = 0; $i < count($args) - 2; $i++) {
        @(list($key, $value) = explode('=', @$args[$i]));
        if (substr($key, -2) == '[]') {
开发者ID:myindexlike,项目名称:MODX.snippets,代码行数:31,代码来源:phpThumb.php

示例3: dirname

        $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
    }
    ob_end_clean();
} elseif (file_exists(dirname(__FILE__) . '/phpThumb.config.php.default')) {
    $phpThumb->config_disable_debug = false;
    // otherwise error message won't print
    $phpThumb->ErrorImage('Please rename "phpThumb.config.php.default" to "phpThumb.config.php"');
} else {
    $phpThumb->config_disable_debug = false;
    // otherwise error message won't print
    $phpThumb->ErrorImage('failed to include_once(' . dirname(__FILE__) . '/phpThumb.config.php) - realpath="' . realpath(dirname(__FILE__) . '/phpThumb.config.php') . '"');
}
if (empty($PHPTHUMB_CONFIG['disable_pathinfo_parsing']) && (empty($_GET) || isset($_GET['phpThumbDebug'])) && !empty($_SERVER['PATH_INFO'])) {
    $_SERVER['PHP_SELF'] = str_replace($_SERVER['PATH_INFO'], '', @$_SERVER['PHP_SELF']);
    $args = explode(';', substr($_SERVER['PATH_INFO'], 1));
    $phpThumb->DebugMessage('PATH_INFO.$args set to (' . implode(')(', $args) . ')', __FILE__, __LINE__);
    if (!empty($args)) {
        $_GET['src'] = @$args[count($args) - 1];
        $phpThumb->DebugMessage('PATH_INFO."src" = "' . $_GET['src'] . '"', __FILE__, __LINE__);
        if (preg_match('#^new\\=([a-z0-9]+)#i', $_GET['src'], $matches)) {
            unset($_GET['src']);
            $_GET['new'] = $matches[1];
        }
    }
    if (preg_match('#^([0-9]*)x?([0-9]*)$#i', @$args[count($args) - 2], $matches)) {
        $_GET['w'] = $matches[1];
        $_GET['h'] = $matches[2];
        $phpThumb->DebugMessage('PATH_INFO."w"x"h" set to "' . $_GET['w'] . '"x"' . $_GET['h'] . '"', __FILE__, __LINE__);
    }
    for ($i = 0; $i < count($args) - 2; $i++) {
        @(list($key, $value) = explode('=', @$args[$i]));
开发者ID:matteoantoci,项目名称:phpthumb,代码行数:31,代码来源:phpThumb.php

示例4: elseif

$CanPassThroughDirectly = true;
if (!empty($phpThumb->rawImageData)) {
    // data from SQL, should be fine
} elseif (!@is_file(@$_GET['src']) || !@is_readable(@$_GET['src'])) {
    $CanPassThroughDirectly = false;
}
foreach ($_GET as $key => $value) {
    switch ($key) {
        case 'src':
            // allowed
            break;
        default:
            // all other parameters will cause some processing,
            // therefore cannot pass through original image unmodified
            $CanPassThroughDirectly = false;
            $phpThumb->DebugMessage('Cannot pass through directly because $_GET[' . $key . '] is set', __FILE__, __LINE__);
            break 2;
    }
}
////////////////////////////////////////////////////////////////
// Debug output, to try and help me diagnose problems
if (@$_GET['phpThumbDebug'] == '4') {
    $phpThumb->phpThumbDebug();
}
////////////////////////////////////////////////////////////////
if ($CanPassThroughDirectly && $phpThumb->src) {
    // no parameters set, passthru
    $SourceFilename = $phpThumb->ResolveFilenameToAbsolute($phpThumb->src);
    if (@$_GET['phpThumbDebug']) {
        $phpThumb->DebugMessage('Would have passed "' . $SourceFilename . '" through directly, but skipping due to phpThumbDebug', __FILE__, __LINE__);
    } else {
开发者ID:BackupTheBerlios,项目名称:milaninegw-svn,代码行数:31,代码来源:phpThumb.php

示例5: array

            $phpThumb->{$key} = $value;
        }
    }
}
////////////////////////////////////////////////////////////////
// Debug output, to try and help me diagnose problems
if (@$_REQUEST['phpThumbDebug'] == '2') {
    $phpThumb->phpThumbDebug();
}
////////////////////////////////////////////////////////////////
// check to see if file can be output from source with no processing or caching
$CanPassThroughDirectly = true;
$FilenameParameters = array('h', 'w', 'sx', 'sy', 'sw', 'sh', 'bw', 'brx', 'bry', 'bg', 'bgt', 'bc', 'usa', 'usr', 'ust', 'wmf', 'wmp', 'wmm', 'wma', 'xto', 'ra', 'ar', 'iar', 'maxb');
foreach ($FilenameParameters as $key) {
    if (isset($_REQUEST[$key])) {
        $phpThumb->DebugMessage('Cannot pass through directly because $_REQUEST[' . $key . '] is set to "' . $_REQUEST[$key] . '"', __FILE__, __LINE__);
        $CanPassThroughDirectly = false;
        break;
    }
}
////////////////////////////////////////////////////////////////
// Debug output, to try and help me diagnose problems
if (@$_REQUEST['phpThumbDebug'] == '3') {
    $phpThumb->phpThumbDebug();
}
////////////////////////////////////////////////////////////////
if ($CanPassThroughDirectly && !empty($_REQUEST['src'])) {
    // no parameters set, passthru
    $SourceFilename = $phpThumb->ResolveFilenameToAbsolute($_REQUEST['src']);
    if ($getimagesize = @GetImageSize($SourceFilename)) {
        if (!empty($_REQUEST['phpThumbDebug'])) {
开发者ID:BackupTheBerlios,项目名称:ydframework-svn,代码行数:31,代码来源:phpThumb.php


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