fscanf
说明
mixed fscanf ( resource handle, string format [, string var1])fscanf() 函数和 sscanf() 相似,但是它从与 handle 关联的文件中接受输入并根据指定的 format(定义于 sprintf() 的文档中)来解释输入。如果只给此函数传递了两个参数,解析后的值会被作为数组返回。否则,如果提供了可选参数,此函数将返回被赋值的数目。可选参数必须用引用传递。
格式字符串中的任何空白会与输入流中的任何空白匹配。这意味着甚至格式字符串中的制表符 /t 也会与输入流中的一个空格字符匹配。
注: 在 PHP 4.3.0 之前,从文件中读入的最大字符数是 512(或者第一个 /n,看先碰到哪种情况)。从 PHP 4.3.0 起可以读取任意长的行。
参见 fread(),fgets(),fgetss(),sscanf(),printf() 和 sprintf()。
mb_convert_encoding
Description
string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding])mb_convert_encoding() converts character encoding of string str from from-encoding to to-encoding.
str : String to be converted.
from-encoding is specified by character code name before conversion. it can be array or string - comma separated enumerated list. If it is not specified, the internal encoding will be used.
See also mb_detect_order().
iconv
Description
string iconv ( string in_charset, string out_charset, string str)Performs a character set conversion on the string str from in_charset to out_charset. Returns the converted string or FALSE on failure.