在phpThumb中打开错误消息

时间:2012-05-06 22:53:52

标签: php image-processing phpthumb

我是怎么做到的?我查看了phpThumb.php并设置了以下内容,因此我不知道为什么我在demo页面上收到错误

ini_set('display_errors', 1); 
error_reporting(E_ALL); 

2 个答案:

答案 0 :(得分:19)

在phpThumb.config.php中将此行更改为false: $ PHPTHUMB_CONFIG ['disable_debug'] = true;

答案 1 :(得分:4)

PHP错误报告和您在图像中看到的错误消息是两回事,因此这些设置无关。

编辑:phpThumb()具有以下错误配置:

// * Error message configuration
$PHPTHUMB_CONFIG['error_image_width']           = 400;      // default width for error images
$PHPTHUMB_CONFIG['error_image_height']          = 100;      // default height for error images
$PHPTHUMB_CONFIG['error_message_image_default'] = '';       // Set this to the name of a generic error image (e.g. '/images/error.png') that you want displayed in place of any error message that may occur. This setting is overridden by the 'err' parameter, which does the same thing.
$PHPTHUMB_CONFIG['error_bgcolor']               = 'CCCCFF'; // background color of error message images
$PHPTHUMB_CONFIG['error_textcolor']             = 'FF0000'; // color of text in error messages
$PHPTHUMB_CONFIG['error_fontsize']              = 1;        // size of text in error messages, from 1 (smallest) to 5 (largest)
$PHPTHUMB_CONFIG['error_die_on_error']          = true;     // die with error message on any fatal error (recommended with standalone phpThumb.php)
$PHPTHUMB_CONFIG['error_silent_die_on_error']   = false;    // simply die with no output of any kind on fatal errors (not recommended)
$PHPTHUMB_CONFIG['error_die_on_source_failure'] = true;     // die with error message if source image cannot be processed by phpThumb() (usually because source image is corrupt in some way). If false the source image will be passed through unprocessed, if true (default) an error message will be displayed.

来源:http://phpthumb.sourceforge.net/index.php?source=phpThumb.config.php