如何从php.ini中启用mbstring? [英] How to enable mbstring from php.ini?

查看:543
本文介绍了如何从php.ini中启用mbstring?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在本地主机上启用mbstring扩展时,我确实遇到困难.

I have real difficulties with enabling mbstring extension on my localhost.

我正在使用适用于Windows的XAMPP 1.7.4(具有PHP 5.3.5),并尝试根据

I'm using XAMPP 1.7.4, for Windows, which has PHP 5.3.5, and tried to edit my php.ini file according to the documentation and various other examples I found online. After about 6 hours of this, all I managed to do is get a "Error 500 - Server error' message, that didn't go away even after I rolled-back all changes to the .ini file.

我需要做的是使用 tFPDF 创建带有丹麦字符的PDF发票,以支持UTF- 8种编码方式.

What I need to do, is create PDF invoices with Danish characters, using tFPDF, to support UTF-8 encoding.

如果这里有人知道一些技巧,建议或有效的php.ini设置示例,请提供帮助,因为我开始失去这个技巧了! :|

If anybody here knows some tips, suggestions, or an example of a working php.ini setup, please help out, 'cause I'm starting to lose my hair over this one! :|

非常感谢!

推荐答案

所有XAMPP软件包均安装了多字节字符串( php_mbstring.dll )扩展名.

All XAMPP packages come with Multibyte String (php_mbstring.dll) extension installed.

如果您不小心从php/ext文件夹中删除了DLL文件,只需将其重新添加(从XAMPP zip存档中获取副本-可下载).

If you have accidentally removed DLL file from php/ext folder, just add it back (get the copy from XAMPP zip archive - its downloadable).

如果您已从php.ini文件中删除了随附的INI配置行,则也将其重新添加:

If you have deleted the accompanying INI configuration line from php.ini file, add it back as well:

extension=php_mbstring.dll

此外,请确保使用XAMPP控制面板重新启动Web服务器( Apache ).

Also, ensure to restart your webserver (Apache) using XAMPP control panel.

有关启用PHP扩展的其他信息

  • 安装扩展名(例如,将 php_mbstring.dll 放入/XAMPP/php/ext目录)
  • php.ini 中,确保指定扩展名目录(例如extension_dir = "ext")
  • 确保正确构建DLL文件(例如32位线程安全VC9仅适用于使用完全相同的工具和配置(32位线程安全VC9)构建的DLL文件)
  • 确保PHP API版本匹配(如果,一旦重新启动Web服务器,您将收到相关错误.)
  • install extension (e.g. put php_mbstring.dll into /XAMPP/php/ext directory)
  • in php.ini, ensure extension directory specified (e.g. extension_dir = "ext")
  • ensure correct build of DLL file (e.g. 32bit thread-safe VC9 only works with DLL files built using exact same tools and configuration: 32bit thread-safe VC9)
  • ensure PHP API versions match (If not, once you restart the webserver you will receive related error.)

这篇关于如何从php.ini中启用mbstring?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆