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


PHP phpThumb::phpThumbDebugVarDump方法代码示例

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


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

示例1: list

    list($color, $description) = $details;
    echo '<tr><th>' . $function . '</th><th colspan="2" bgcolor="';
    if (function_exists(strtolower($function))) {
        echo 'lime">TRUE';
    } else {
        echo $color . '">FALSE';
    }
    echo '</th><td>' . $description . '</td></tr>';
}
echo '<tr bgcolor="#EEEEEE"><th colspan="4">&nbsp;</th></tr>';
echo '<tr bgcolor="#EEEEEE"><th>Setting</th><th>Master Value</th><th>Local Value</th><th>Comments</th></tr>';
$SettingFeatures = array('magic_quotes_runtime' => array('red', 'lime', 'This setting is evil. Turn it off.'), 'magic_quotes_gpc' => array('yellow', 'lime', 'This setting is bad. Turn it off, if possible. phpThumb will attempt to work around it if it is enabled.'), 'safe_mode' => array('orange', 'lime', 'Best if off. Calls to ImageMagick will be disabled if safe_mode is set to prevent writing temp files (limiting max image resolution, no animated GIF resize). Raw image data sources (e.g. from MySQL database) may not work. Temp files may be disabled. Features will be limited. If disabled in Master but enabled in Local, edit httpd.conf and set (php_admin_value safe_mode "Off") between <VirtualHost> tags'), 'allow_url_fopen' => array('lime', 'yellow', 'Best if on. HTTP source images will be unavailable if disabled and CURL is unavailable.'));
foreach ($SettingFeatures as $feature => $FeaturesDetails) {
    list($color_true, $color_false, $reason) = $FeaturesDetails;
    echo '<tr><th>' . $feature . ':</th>';
    echo '<th bgcolor="' . (@get_cfg_var($feature) ? $color_true : $color_false) . '">' . $phpThumb->phpThumbDebugVarDump((bool) @get_cfg_var($feature)) . '</th>';
    echo '<th bgcolor="' . (@ini_get($feature) ? $color_true : $color_false) . '">' . $phpThumb->phpThumbDebugVarDump((bool) @ini_get($feature)) . '</th>';
    echo '<td>' . htmlentities($reason) . '</td></tr>';
}
$MissingFunctionSeverity = array('shell_exec' => 'red', 'system' => 'red', 'passthru' => 'red', 'exec' => 'red', 'curl_exec' => 'orange');
$DisabledFunctions[0] = explode(',', @get_cfg_var('disable_functions'));
$DisabledFunctions[1] = explode(',', @ini_get('disable_functions'));
echo '<tr><th>disable_functions:</th>';
for ($i = 0; $i <= 1; $i++) {
    //echo '<th bgcolor="'.(count($DisabledFunctions[$i]) ? 'yellow' : 'lime').'">';
    echo '<th>';
    $disabled_functions = '';
    foreach ($DisabledFunctions[$i] as $key => $value) {
        if (@$MissingFunctionSeverity[$value]) {
            $DisabledFunctions[$i][$key] = '<span style="background-color: ' . $MissingFunctionSeverity[$value] . ';">' . $value . '</span>';
        }
开发者ID:jtresca,项目名称:nysurveyor,代码行数:31,代码来源:phpThumb.demo.check.php

示例2: die

        } else {
            $phpThumb->ErrorImage('ERROR: "' . $SourceFilename . '" cannot be read');
        }
    }
    if (@$_SERVER['HTTP_REFERER']) {
        $phpThumb->ErrorImage('&md5s=' . $md5s);
    } else {
        die('&md5s=' . $md5s);
    }
}
if (!empty($PHPTHUMB_CONFIG)) {
    foreach ($PHPTHUMB_CONFIG as $key => $value) {
        $keyname = 'config_' . $key;
        $phpThumb->setParameter($keyname, $value);
        if (!preg_match('/password/i', $key)) {
            $phpThumb->DebugMessage('setParameter(' . $keyname . ', ' . $phpThumb->phpThumbDebugVarDump($value) . ')', __FILE__, __LINE__);
        }
    }
} else {
    $phpThumb->DebugMessage('$PHPTHUMB_CONFIG is empty', __FILE__, __LINE__);
}
if (@$_GET['src'] && !@$PHPTHUMB_CONFIG['allow_local_http_src'] && preg_match('/^http\\:\\/\\/' . @$_SERVER['HTTP_HOST'] . '(.+)/i', @$_GET['src'], $matches)) {
    $phpThumb->ErrorImage('It is MUCH better to specify the "src" parameter as "' . $matches[1] . '" instead of "' . $matches[0] . '".' . "\n\n" . 'If you really must do it this way, enable "allow_local_http_src" in phpThumb.config.php');
}
////////////////////////////////////////////////////////////////
// Debug output, to try and help me diagnose problems
$phpThumb->DebugTimingMessage('phpThumbDebug[1]', __FILE__, __LINE__);
if (@$_GET['phpThumbDebug'] == '1') {
    $phpThumb->phpThumbDebug();
}
////////////////////////////////////////////////////////////////
开发者ID:CrazyBobik,项目名称:allotaxi.test,代码行数:31,代码来源:phpThumb.php

示例3: list

    list($color, $description) = $details;
    echo '<tr><th>' . $function . '</th><th colspan="2" style="background-color: ';
    if (function_exists(strtolower($function))) {
        echo 'lime;">TRUE';
    } else {
        echo $color . ';">FALSE';
    }
    echo '</th><td>' . htmlentities($description) . '</td></tr>';
}
echo '<tr style="background-color: #EEEEEE;"><th colspan="4">&nbsp;</th></tr>';
echo '<tr style="background-color: #EEEEEE;"><th>Setting</th><th>Master Value</th><th>Local Value</th><th>Comments</th></tr>';
$SettingFeatures = array('magic_quotes_runtime' => array('red', 'lime', 'This setting is evil. Turn it off.'), 'magic_quotes_gpc' => array('yellow', 'lime', 'This setting is bad. Turn it off, if possible. phpThumb will attempt to work around it if it is enabled.'), 'safe_mode' => array('orange', 'lime', 'Best if off. Calls to ImageMagick will be disabled if safe_mode is set to prevent writing temp files (limiting max image resolution, no animated GIF resize). Raw image data sources (e.g. from MySQL database) may not work. Temp files may be disabled. Features will be limited. If disabled in Master but enabled in Local, edit httpd.conf and set (php_admin_value safe_mode "Off") between <VirtualHost> tags'), 'allow_url_fopen' => array('lime', 'yellow', 'Best if on. HTTP source images will be unavailable if disabled and CURL is unavailable.'));
foreach ($SettingFeatures as $feature => $FeaturesDetails) {
    list($color_true, $color_false, $reason) = $FeaturesDetails;
    echo '<tr><th>' . $feature . ':</th>';
    echo '<th style="background-color: ' . (@get_cfg_var($feature) ? $color_true : $color_false) . ';">' . $phpThumb->phpThumbDebugVarDump((bool) @get_cfg_var($feature)) . '</th>';
    echo '<th style="background-color: ' . (preg_match('#(1|ON)#i', @ini_get($feature)) ? $color_true : $color_false) . ';">' . $phpThumb->phpThumbDebugVarDump((bool) preg_match('#(1|ON)#i', ini_get($feature))) . '</th>';
    echo '<td>' . htmlentities($reason) . '</td></tr>';
}
$MissingFunctionSeverity = array('shell_exec' => 'red', 'system' => 'red', 'passthru' => 'red', 'exec' => 'red', 'curl_exec' => 'orange');
$DisabledFunctions[0] = explode(',', @get_cfg_var('disable_functions'));
$DisabledFunctions[1] = explode(',', @ini_get('disable_functions'));
echo '<tr><th>disable_functions:</th>';
for ($i = 0; $i <= 1; $i++) {
    foreach ($DisabledFunctions[$i] as $key => $value) {
        if (!empty($MissingFunctionSeverity[$value])) {
            $DisabledFunctions[$i][$key] = '<span style="background-color: ' . $MissingFunctionSeverity[$value] . ';">' . $value . '</span>';
        }
    }
    $disabled_functions = implode(', ', $DisabledFunctions[$i]);
    echo '<th style="background-color: ' . ($disabled_functions ? 'yellow' : 'lime') . ';">';
开发者ID:madberry,项目名称:WhiteLabelTransfer,代码行数:31,代码来源:phpThumb.demo.check.php


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