【发布时间】:2010-02-17 01:14:23
【问题描述】:
我在本地主机中尝试了 php gettext,一切正常,但是当我将文件上传到我的主机时,它显示如下:
Warning: putenv(): Safe Mode warning: Cannot set environment variable 'LC_ALL' - it's not in the allowed list in /www/zxq.net/w/e/e/weedcl/htdocs/localization.php on line 4 Fatal error: Call to undefined function bindtextdomain() in /www/zxq.net/w/e/e/weedcl/htdocs/localization.php on line 6
我正在使用免费托管服务Zymic(这与它免费的事实有关吗?)。
我的localization.php:
<?php
$locale = "de_DE";
if (isSet($_GET["locale"])) $locale = $_GET["locale"];
putenv("LC_ALL=$locale");
setlocale(LC_ALL, $locale);
bindtextdomain("messages", "./locale");
bind_textdomain_codeset("messages", 'UTF-8');
textdomain("messages");
?>
【问题讨论】: