2012-05-06 87 views

回答

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

+0

@Nicola:是的,phpThumb()的文檔沒有用。代碼質量也不是很好。但是,嘿,它確實有用。我通常更喜歡wideimage,如果答案幫助了你,請接受它。 – hakre

+0

廣泛的形象,我會檢查出來的感謝。 – Nicola

+0

我需要製作縮略圖,wideimage絕對更好。 –

19

更改此線爲false phpThumb.config.php: $ PHPTHUMB_CONFIG [ 'disable_debug'] =真正;

+1

謝謝!!這個設置不在配置的「錯誤消息配置」部分中有多愚蠢? =/ – Brade

+1

這應該肯定會添加到所選的答案,因爲如果設置爲true,該設置會殺死所有其他人 – user14764