RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:9:30-18:00
你可能遇到了下面的问题
关闭右侧工具栏
php中的iconv functions
  • 作者:zhaozj
  • 发表时间:2020-12-23 10:58
  • 来源:未知

介绍

This module contains an interface to the iconv library functions. The iconv library functions convert strings between various character sets encodings. The supported character sets depend on the iconv() implementation on your system. Note that the iconv() function on some systems may not work as well as you expect. In this case, you should install the libiconv library.

需求

Your systems standard C library must provide the iconv() function or you must have libiconv installed on your system. The libiconv library is available from http://www.gnu.org/software/libiconv/.

安装

To be able to use the functions defined in this module you must compile your PHP interpreter using the configure line --with-iconv[=DIR].

Note to Win32 Users: In order to enable this module on a Windows environment, you must copy iconv-1.3.dll from the DLL folder of the PHP/Win32 binary package to the SYSTEM32 folder of your windows machine. (Ex: C:/WINNT/SYSTEM32 or C:/WINDOWS/SYSTEM32). Starting with PHP 4.2.1 the name changed to iconv.dll

运行时配置

这些函数的行为受到全局配置文件 php.ini 的影响。

表格 1. Iconv configuration options

NameDefaultChangeable
iconv.input_encodingICONV_INPUT_ENCODINGPHP_INI_ALL
iconv.output_encodingICONV_OUTPUT_ENCODINGPHP_INI_ALL
iconv.internal_encodingICONV_INTERNAL_ENCODINGPHP_INI_ALL
For further details and definition of the PHP_INI_* constants see ini_set().

资源类型

该扩展模块未定义任何资源类型。

预定义常量

Since PHP 4.3.0 it is possible to identify at runtime which iconv implementation is adopted by this extension.

表格 2. iconv constants

constanttypedescription

ICONV_IMPLstringThe implementation name
ICONV_VERSIONstringThe implementation version