PHP 值 mbstring.internal_encoding 可以从 htaccess 文件设置吗?

发布于 2024-08-12 00:40:20 字数 274 浏览 2 评论 0原文

当从 .htaccess 文件内部设置时,用于启用多字节数据的函数重载的以下 PHP 命令似乎不起作用:

php_value mbstring.func_overload 7

我读到 PHP 5.2.x 版本中存在一个错误,导致该命令无法正常工作,但是我使用的是 PHP 5.3.0,但它仍然无法工作?

但如果此设置不适用于 htaccess,是否有其他选项可以更改它?我知道它可以在 php.ini 文件中设置,但如果我这样做,可能会对我的服务器上托管的非 mb 代码产生不利影响!

The following PHP command used to enable function overloading for multibyte data doesn't seem to work when set from inside a .htaccess file:

php_value mbstring.func_overload 7

I read there was a bug in PHP 5.2.x versions that prevented this from working properly, however I'm using PHP 5.3.0 and it still doesn't work?

But if this setting is not intended for htaccess, are there any other options available to change it? I know it could be set in the php.ini file, but if I do that there could be detrimental effects on the non mb code hosted on my server!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

芸娘子的小脾气 2024-08-19 00:40:20

我知道它可以在 php.ini 文件中设置,但如果我这样做,可能会对我的服务器上托管的非 mb 代码产生不利影响!

显然反之亦然。根据 php.net

不建议在每个目录上下文中使用函数重载选项,因为尚未确认它在生产环境中是否足够稳定,并且可能会导致未定义的行为。

Bug 条目 的注释确认此设置只能在 php.ini 中更改。 ini 文件。因此不可能使用 ini_set 更改它。

I know it could be set in the php.ini file, but if I do that there could be detrimental effects on the non mb code hosted on my server!

Well apparently the inverse is also true. According to php.net:

It is not recommended to use the function overloading option in the per-directory context, because it's not confirmed yet to be stable enough in a production environment and may lead to undefined behaviour.

Bug entries have comments that confirm this setting can only be changed in the php.ini file. So it's not possible to alter it using ini_set.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文