How to clear php's gettext cache without restart Apache nor change domain?

前端 未结 6 1548
别跟我提以往
别跟我提以往 2020-12-03 07:34

This is a little code snippet from php manual:

putenv(\'LC_ALL=zh_CN\');
setlocale(LC_ALL, \'zh_CN\');

bindtextdomain(\'domain\', \'./locale\');
textdomain(         


        
6条回答
  •  孤街浪徒
    2020-12-03 07:48

    ok, in my case I needed to restart phpfpm by doing service php5.6-fpm-sp restart.

    If you are using php-fpm you MUST restart phpfpm in order to clear gettext's cache, restarting apache2 doesn't work.

    Hope is useful to someone else.

提交回复
热议问题