J'ai essayé php gettext dans mon localhost et tout a fonctionné, mais quand j'ai téléchargé les fichiers sur mon hébergement, il dit ce qui suit:Php l'extension gettext fonctionne sur mon hôte local, mais sa ne fonctionne pas sur mon hébergement
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
J'utilise le service d'hébergement gratuit Zymic (Est-ce que cela a à voir avec le fait que c'est gratuit?).
Mon 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");
?>