可选模块 intl 未安装或已被禁用
P粉262073176
P粉262073176 2023-10-31 10:35:24
0
1
493

我看到了来自 WordPress 站点运行状况的这条消息。如何安装缺少的模块?

WordPress 托管团队维护着这些模块的列表, 团队手册中推荐和要求的内容

警告可选模块 intl 未安装或已安装 已禁用


P粉262073176
P粉262073176

全部回复(1)
P粉455093123

根据PHP手册此模块提供国际化功能。如果您的网站是多语言的,那么这对您来说很重要。

如果您使用的网络主机为您维护 PHP 安装,那么您将需要联系他们来安装该模块。

如果您管理自己的网络主机,则可以按照如下安装指南进行操作: https://www.iteron.co.za/?page_id=17204

对于基于 Linux 的服务器(假设您具有 root 访问权限)

Make sure the php_intl.so file exists within your php extensions directory, find the extensions directory by:
    using phpinfo()
    running this command: php -r "echo ini_get('extension_dir');"
    (note: both options gets the extension_dir right from the PHP runtime configuration)

If the file exists:
    search for the config file (php.ini, usually /etc/php.ini) and open it
    Make sure the line “extension=php_intl.so” is existing and not commented
    Restart the web server (usually sudo service httpd restart)
    Check if the extension is enabled using phpinfo()
If the file doesn’t exist
    Check your php version by running the “php -v” command
    For PHP 5 install the php-intl package using your package manager – package managers and commands
        Most common: apt-get install php-intl (for ubuntu-based linux) or yum install php-intl (for CentOS)
    For PHP 7, install the php7.x-intl (depending on your php version)
    Repeat the steps for the case in which the file exists

对于基于 Windows 的服务器

Make sure the php_intl.dll file exists within your php extensions directory
    for separately installed PHP: C:\path\to\php\ext\
    for xampp: C:\path\to\xampp\php\ext
    (note: your drive letter might be different)
If the file exists:
    search for the config file (php.ini, usually in the same folder as the php executable) and open it
    Make sure the line “extension=php_intl.dll” is existing and not commented
    Restart the web server (usually apache)
    Check if the extension is enabled using phpinfo()
If the file doesn’t exist:
    Check your php version by running the “php -v” command
    Download the PHP version that corresponds to yours from the PHP Downloads Page (TS/NTS, x86/x64)
        To find thread safety for php, run: php -i | findstr “Thread” , source & more info.
    Search for the php_intl.dll file in the ext folder in that version and copy it in your php\ext folder
    Repeat the steps for the case in which the file exists
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!