diff options
Diffstat (limited to 'frontends/php/include')
| -rw-r--r-- | frontends/php/include/config.inc.php | 15 | ||||
| -rw-r--r-- | frontends/php/include/defines.inc.php | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/frontends/php/include/config.inc.php b/frontends/php/include/config.inc.php index d0337da0..7ebbae52 100644 --- a/frontends/php/include/config.inc.php +++ b/frontends/php/include/config.inc.php @@ -1879,4 +1879,17 @@ function TODO($msg) { echo "TODO: ".$msg.BR; } // DEBUG INFO!!! { return ($timestamp==0)?S_NEVER:date($format,$timestamp); } -?>
\ No newline at end of file + + function encode_log($data) + { + if(defined('ZBX_LOG_ENCODING_DEFAULT') && function_exists('mb_convert_encoding')) + { + $new=mb_convert_encoding($data, S_HTML_CHARSET, ZBX_LOG_ENCODING_DEFAULT); + } + else + { + $new = $data; + } + return $new; + } +?> diff --git a/frontends/php/include/defines.inc.php b/frontends/php/include/defines.inc.php index 8bc95333..d52df3c4 100644 --- a/frontends/php/include/defines.inc.php +++ b/frontends/php/include/defines.inc.php @@ -434,6 +434,9 @@ define('ZBX_GUEST_USER','guest'); +/* Define if your logs are in non-standard format */ +/* define('ZBX_LOG_ENCODING_DEFAULT', 'Shift_JIS');*/ + global $_GET, $_POST, $_COOKIE, $_REQUEST; /* Support for PHP5. PHP5 does not have $HTTP_..._VARS */ |
