Backend Development 35 min read

PHP Function Reference: Math, String, Array, Multibyte, Date/Time, Directory, and File System Functions

This article provides a comprehensive reference of PHP built‑in functions, covering mathematical, string, array, multibyte string, date/time, directory, and file system operations, each listed with a brief description of its purpose and usage.

php中文网 Courses
php中文网 Courses
php中文网 Courses
PHP Function Reference: Math, String, Array, Multibyte, Date/Time, Directory, and File System Functions

Math Functions

<code>abs — 绝对值</code>
<code>acos — 反余弦</code>
<code>acosh — 反双曲余弦</code>
<code>asin — 反正弦</code>
<code>asinh — 反双曲正弦</code>
<code>atan2 — 两个参数的反正切</code>
<code>atan — 反正切</code>
<code>atanh — 反双曲正切</code>
<code>base_convert — 在任意进制之间转换数字</code>
<code>bindec — 二进制转换为十进制</code>
<code>ceil — 进一法取整</code>
<code>cos — 余弦</code>
<code>cosh — 双曲余弦</code>
<code>decbin — 十进制转换为二进制</code>
<code>dechex — 十进制转换为十六进制</code>
<code>decoct — 十进制转换为八进制</code>
<code>deg2rad — 将角度转换为弧度</code>
<code>exp — 计算 e 的指数</code>
<code>expm1 — 返回 exp(number) - 1,甚至当 number 的值接近零也能计算出准确结果</code>
<code>floor — 舍去法取整</code>
<code>fmod — 返回除法的浮点数余数</code>
<code>getrandmax — 显示随机数最大的可能值</code>
<code>hexdec — 十六进制转换为十进制</code>
<code>hypot — 计算一直角三角形的斜边长度</code>
<code>intdiv — 对除法结果取整</code>
<code>is_finite — 判断是否为有限值</code>
<code>is_infinite — 判断是否为无限值</code>
<code>is_nan — 判断是否为合法数值</code>
<code>lcg_value — 组合线性同余发生器</code>
<code>log10 — 以 10 为底的对数</code>
<code>log1p — 返回 log(1 + number),甚至当 number 的值接近零也能计算出准确结果</code>
<code>log — 自然对数</code>
<code>max — 找出最大值</code>
<code>min — 找出最小值</code>
<code>mt_getrandmax — 显示随机数的最大可能值</code>
<code>mt_rand — 生成更好的随机数</code>
<code>mt_srand — 播下一个更好的随机数发生器种子</code>
<code>octdec — 八进制转换为十进制</code>
<code>pi — 得到圆周率值</code>
<code>pow — 指数表达式</code>
<code>rad2deg — 将弧度数转换为相应的角度数</code>
<code>rand — 产生一个随机整数</code>
<code>round — 对浮点数进行四舍五入</code>
<code>sin — 正弦</code>
<code>sinh — 双曲正弦</code>
<code>sqrt — 平方根</code>
<code>srand — 播下随机数发生器种子</code>
<code>tan — 正切</code>
<code>tanh — 双曲正切</code>

String Functions

<code>addcslashes — 以 C 语言风格使用反斜线转义字符串中的字符</code>
<code>addslashes — 使用反斜线引用字符串</code>
<code>bin2hex — 函数把包含数据的二进制字符串转换为十六进制值</code>
<code>chop — rtrim 的别名</code>
<code>chr — 返回指定的字符</code>
<code>chunk_split — 将字符串分割成小块</code>
<code>convert_cyr_string — 将字符由一种 Cyrillic 字符转换成另一种</code>
<code>convert_uudecode — 解码一个 uuencode 编码的字符串</code>
<code>convert_uuencode — 使用 uuencode 编码一个字符串</code>
<code>count_chars — 返回字符串所用字符的信息</code>
<code>crc32 — 计算一个字符串的 crc32 多项式</code>
<code>crypt — 单向字符串散列</code>
<code>echo — 输出一个或多个字符串</code>
<code>explode — 使用一个字符串分割另一个字符串</code>
<code>fprintf — 将格式化后的字符串写入到流</code>
<code>get_html_translation_table — 返回使用 htmlspecialchars 和 htmlentities 后的转换表</code>
<code>hebrev — 将逻辑顺序希伯来文(logical-Hebrew)转换为视觉顺序希伯来文(visual-Hebrew)</code>
<code>hebrevc — 将逻辑顺序希伯来文(logical-Hebrew)转换为视觉顺序希伯来文(visual-Hebrew),并且转换换行符</code>
<code>hex2bin — 转换十六进制字符串为二进制字符串</code>
<code>html_entity_decode — Convert HTML entities to their corresponding characters</code>
<code>htmlentities — 将字符转换为 HTML 转义字符</code>
<code>htmlspecialchars_decode — 将特殊的 HTML 实体转换回普通字符</code>
<code>htmlspecialchars — 将特殊字符转换为 HTML 实体</code>
<code>implode — 将一个一维数组的值转化为字符串</code>
<code>join — 别名 implode</code>
<code>lcfirst — 使一个字符串的第一个字符小写</code>
<code>levenshtein — 计算两个字符串之间的编辑距离</code>
<code>localeconv — Get numeric formatting information</code>
<code>ltrim — 删除字符串开头的空白字符(或其他字符)</code>
<code>md5_file — 计算指定文件的 MD5 散列值</code>
<code>md5 — 计算字符串的 MD5 散列值</code>
<code>metaphone — Calculate the metaphone key of a string</code>
<code>money_format — 将数字格式化成货币字符串</code>
<code>nl_langinfo — Query language and locale information</code>
<code>nl2br — 在字符串所有新行之前插入 HTML 换行标记</code>
<code>number_format — 以千位分隔符方式格式化一个数字</code>
<code>ord — 转换字符串第一个字节为 0-255 之间的值</code>
<code>parse_str — 将字符串解析成多个变量</code>
<code>print — 输出字符串</code>
<code>printf — 输出格式化字符串</code>
<code>quoted_printable_decode — 将 quoted-printable 字符串转换为 8-bit 字符串</code>
<code>quoted_printable_encode — 将 8-bit 字符串转换成 quoted-printable 字符串</code>
<code>quotemeta — 转义元字符集</code>
<code>rtrim — 删除字符串末端的空白字符(或者其他字符)</code>
<code>setlocale — 设置地区信息</code>
<code>sha1_file — 计算文件的 sha1 散列值</code>
<code>sha1 — 计算字符串的 sha1 散列值</code>
<code>similar_text — 计算两个字符串的相似度</code>
<code>soundex — Calculate the soundex key of a string</code>
<code>sprintf — Return a formatted string</code>
<code>sscanf — 根据指定格式解析输入的字符</code>
<code>str_getcsv — 解析 CSV 字符串为一个数组</code>
<code>str_ireplace — str_replace 的忽略大小写版本</code>
<code>str_pad — 使用另一个字符串填充字符串为指定长度</code>
<code>str_repeat — 重复一个字符串</code>
<code>str_replace — 子字符串替换</code>
<code>str_rot13 — 对字符串执行 ROT13 转换</code>
<code>str_shuffle — 随机打乱一个字符串</code>
<code>str_split — 将字符串转换为数组</code>
<code>str_word_count — 返回字符串中单词的使用情况</code>
<code>strcasecmp — 二进制安全比较字符串(不区分大小写)</code>
<code>strchr — 别名 strstr</code>
<code>strcmp — 二进制安全字符串比较</code>
<code>strcoll — 基于区域设置的字符串比较</code>
<code>strcspn — 获取不匹配遮罩的起始子字符串的长度</code>
<code>strip_tags — 从字符串中去除 HTML 和 PHP 标记</code>
<code>stripcslashes — 反引用一个使用 addcslashes 转义的字符串</code>
<code>stripos — 查找字符串首次出现的位置(不区分大小写)</code>
<code>stripslashes — 反引用一个引用字符串</code>
<code>stristr — strstr 函数的忽略大小写版本</code>
<code>strlen — 获取字符串长度</code>
<code>strnatcasecmp — 使用“自然顺序”算法比较字符串(不区分大小写)</code>
<code>strnatcmp — 使用自然排序算法比较字符串</code>
<code>strncasecmp — 二进制安全比较字符串开头的若干个字符(不区分大小写)</code>
<code>strncmp — 二进制安全比较字符串开头的若干个字符</code>
<code>strpbrk — 在字符串中查找一组字符的任何一个字符</code>
<code>strpos — 查找字符串首次出现的位置</code>
<code>strrchr — 查找指定字符在字符串中的最后一次出现</code>
<code>strrev — 反转字符串</code>
<code>strripos — 计算指定字符串在目标字符串中最后一次出现的位置(不区分大小写)</code>
<code>strrpos — 计算指定字符串在目标字符串中最后一次出现的位置</code>
<code>strspn — 计算字符串中全部字符都存在于指定字符集合中的第一段子串的长度。</code>
<code>strstr — 查找字符串的首次出现</code>
<code>strtok — 标记分割字符串</code>
<code>strtolower — 将字符串转化为小写</code>
<code>strtoupper — 将字符串转化为大写</code>
<code>strtr — 转换指定字符</code>
<code>substr_compare — 二进制安全比较字符串(从偏移位置比较指定长度)</code>
<code>substr_count — 计算字串出现的次数</code>
<code>substr_replace — 替换字符串的子串</code>
<code>substr — 返回字符串的子串</code>
<code>trim — 去除字符串首尾处的空白字符(或者其他字符)</code>
<code>ucfirst — 将字符串的首字母转换为大写</code>
<code>ucwords — 将字符串中每个单词的首字母转换为大写</code>
<code>vfprintf — 将格式化字符串写入流</code>
<code>vprintf — 输出格式化字符串</code>
<code>vsprintf — 返回格式化字符串</code>
<code>wordwrap — 打断字符串为指定数量的字串</code>

Array Functions

<code>array_change_key_case — 将数组中的所有键名修改为全大写或小写</code>
<code>array_chunk — 将一个数组分割成多个</code>
<code>array_column — 返回数组中指定的一列</code>
<code>array_combine — 创建一个数组,用一个数组的值作为其键名,另一个数组的值作为其值</code>
<code>array_count_values — 统计数组中所有的值</code>
<code>array_diff_assoc — 带索引检查计算数组的差集</code>
<code>array_diff_key — 使用键名比较计算数组的差集</code>
<code>array_diff_uassoc — 用用户提供的回调函数做索引检查来计算数组的差集</code>
<code>array_diff_ukey — 用回调函数对键名比较计算数组的差集</code>
<code>array_diff — 计算数组的差集</code>
<code>array_fill_keys — 使用指定的键和值填充数组</code>
<code>array_fill — 用给定的值填充数组</code>
<code>array_filter — 用回调函数过滤数组中的单元</code>
<code>array_flip — 交换数组中的键和值</code>
<code>array_intersect_assoc — 带索引检查计算数组的交集</code>
<code>array_intersect_key — 使用键名比较计算数组的交集</code>
<code>array_intersect_uassoc — 带索引检查计算数组的交集,用回调函数比较索引</code>
<code>array_intersect_ukey — 用回调函数比较键名来计算数组的交集</code>
<code>array_intersect — 计算数组的交集</code>
<code>array_key_exists — 检查数组里是否有指定的键名或索引</code>
<code>array_key_first — Gets the first key of an array</code>
<code>array_key_last — Gets the last key of an array</code>
<code>array_keys — 返回数组中部分的或所有的键名</code>
<code>array_map — 为数组的每个元素应用回调函数</code>
<code>array_merge_recursive — 递归地合并一个或多个数组</code>
<code>array_merge — 合并一个或多个数组</code>
<code>array_multisort — 对多个数组或多维数组进行排序</code>
<code>array_pad — 以指定长度将一个值填充进数组</code>
<code>array_pop — 弹出数组最后一个单元(出栈)</code>
<code>array_product — 计算数组中所有值的乘积</code>
<code>array_push — 将一个或多个单元压入数组的末尾(入栈)</code>
<code>array_rand — 从数组中随机取出一个或多个单元</code>
<code>array_reduce — 用回调函数迭代地将数组简化为单一的值</code>
<code>array_replace_recursive — 使用传递的数组递归替换第一个数组的元素</code>
<code>array_replace — 使用传递的数组替换第一个数组的元素</code>
<code>array_reverse — 返回单元顺序相反的数组</code>
<code>array_search — 在数组中搜索给定的值,如果成功则返回首个相应的键名</code>
<code>array_shift — 将数组开头的单元移出数组</code>
<code>array_slice — 从数组中取出一段</code>
<code>array_splice — 去掉数组中的某一部分并用其它值取代</code>
<code>array_sum — 对数组中所有值求和</code>
<code>array_udiff_assoc — 带索引检查计算数组的差集,用回调函数比较数据</code>
<code>array_udiff_uassoc — 带索引检查计算数组的差集,用回调函数比较数据和索引</code>
<code>array_udiff — 用回调函数比较数据来计算数组的差集</code>
<code>array_uintersect_assoc — 带索引检查计算数组的交集,用回调函数比较数据</code>
<code>array_uintersect_uassoc — 带索引检查计算数组的交集,用单独的回调函数比较数据和索引</code>
<code>array_uintersect — 计算数组的交集,用回调函数比较数据</code>
<code>array_unique — 移除数组中重复的值</code>
<code>array_unshift — 在数组开头插入一个或多个单元</code>
<code>array_values — 返回数组中所有的值</code>
<code>array_walk_recursive — 对数组中的每个成员递归地应用用户函数</code>
<code>array_walk — 使用用户自定义函数对数组中的每个元素做回调处理</code>
<code>array — 新建一个数组</code>
<code>arsort — 对数组进行逆向排序并保持索引关系</code>
<code>asort — 对数组进行排序并保持索引关系</code>
<code>compact — 建立一个数组,包括变量名和它们的值</code>
<code>count — 计算数组中的单元数目,或对象中的属性个数</code>
<code>current — 返回数组中的当前单元</code>
<code>each — 返回数组中当前的键/值对并将数组指针向前移动一步</code>
<code>end — 将数组的内部指针指向最后一个单元</code>
<code>extract — 从数组中将变量导入到当前的符号表</code>
<code>in_array — 检查数组中是否存在某个值</code>
<code>key_exists — 别名 array_key_exists</code>
<code>key — 从关联数组中取得键名</code>
<code>krsort — 对数组按照键名逆向排序</code>
<code>ksort — 对数组按照键名排序</code>
<code>list — 把数组中的值赋给一组变量</code>
<code>natcasesort — 用“自然排序”算法对数组进行不区分大小写字母的排序</code>
<code>natsort — 用“自然排序”算法对数组排序</code>
<code>next — 将数组中的内部指针向前移动一位</code>
<code>pos — current 的别名</code>
<code>prev — 将数组的内部指针倒回一位</code>
<code>range — 根据范围创建数组,包含指定的元素</code>
<code>reset — 将数组的内部指针指向第一个单元</code>
<code>rsort — 对数组逆向排序</code>
<code>shuffle — 打乱数组</code>
<code>sizeof — count 的别名</code>
<code>sort — 对数组排序</code>
<code>uasort — 使用用户自定义的比较函数对数组中的值进行排序并保持索引关联</code>
<code>uksort — 使用用户自定义的比较函数对数组中的键名进行排序</code>
<code>usort — 使用用户自定义的比较函数对数组中的值进行排序</code>

Multibyte String Functions

<code>mb_check_encoding — 检查字符串在指定的编码里是否有效</code>
<code>mb_chr — Get a specific character</code>
<code>mb_convert_case — 对字符串进行大小写转换</code>
<code>mb_convert_encoding — 转换字符的编码</code>
<code>mb_convert_kana — Convert “kana” one from another (“zen-kaku”, “han-kaku” and more)</code>
<code>mb_convert_variables — 转换一个或多个变量的字符编码</code>
<code>mb_decode_mimeheader — 解码 MIME 头字段中的字符串</code>
<code>mb_decode_numericentity — 根据 HTML 数字字符串解码成字符</code>
<code>mb_detect_encoding — 检测字符的编码</code>
<code>mb_detect_order — 设置/获取 字符编码的检测顺序</code>
<code>mb_encode_mimeheader — 为 MIME 头编码字符串</code>
<code>mb_encode_numericentity — Encode character to HTML numeric string reference</code>
<code>mb_encoding_aliases — Get aliases of a known encoding type</code>
<code>mb_ereg_match — Regular expression match for multibyte string</code>
<code>mb_ereg_replace_callback — Perform a regular expression search and replace with multibyte support using a callback</code>
<code>mb_ereg_replace — Replace regular expression with multibyte support</code>
<code>mb_ereg_search_getpos — Returns start point for next regular expression match</code>
<code>mb_ereg_search_getregs — Retrieve the result from the last multibyte regular expression match</code>
<code>mb_ereg_search_init — Setup string and regular expression for a multibyte regular expression match</code>
<code>mb_ereg_search_pos — Returns position and length of a matched part of the multibyte regular expression for a predefined multibyte string</code>
<code>mb_ereg_search_regs — Returns the matched part of a multibyte regular expression</code>
<code>mb_ereg_search_setpos — Set start point of next regular expression match</code>
<code>mb_ereg_search — Multibyte regular expression match for predefined multibyte string</code>
<code>mb_ereg — Regular expression match with multibyte support</code>
<code>mb_eregi_replace — Replace regular expression with multibyte support ignoring case</code>
<code>mb_eregi — Regular expression match ignoring case with multibyte support</code>
<code>mb_get_info — 获取 mbstring 的内部设置</code>
<code>mb_http_input — 检测 HTTP 输入字符编码</code>
<code>mb_http_output — 设置/获取 HTTP 输出字符编码</code>
<code>mb_internal_encoding — 设置/获取内部字符编码</code>
<code>mb_language — 设置/获取当前的语言</code>
<code>mb_list_encodings — 返回所有支持编码的数组</code>
<code>mb_ord — Get code point of character</code>
<code>mb_output_handler — 在输出缓冲中转换字符编码的回调函数</code>
<code>mb_parse_str — 解析 GET/POST/COOKIE 数据并设置全局变量</code>
<code>mb_preferred_mime_name — 获取 MIME 字符串</code>
<code>mb_regex_encoding — Set/Get character encoding for multibyte regex</code>
<code>mb_regex_set_options — Set/Get the default options for mbregex functions</code>
<code>mb_scrub — Description</code>
<code>mb_send_mail — 发送编码过的邮件</code>
<code>mb_split — 使用正则表达式分割多字节字符串</code>
<code>mb_strcut — 获取字符的一部分</code>
<code>mb_strimwidth — 获取按指定宽度截断的字符串</code>
<code>mb_stripos — 大小写不敏感地查找字符串在另一个字符串中首次出现的位置</code>
<code>mb_stristr — 大小写不敏感地查找字符串在另一个字符串里的首次出现</code>
<code>mb_strlen — 获取字符串的长度</code>
<code>mb_strpos — 查找字符串在另一个字符串中首次出现的位置</code>
<code>mb_strrchr — 查找指定字符在另一个字符串中最后一次的出现</code>
<code>mb_strrichr — 大小写不敏感地查找指定字符在另一个字符串中最后一次的出现</code>
<code>mb_strripos — 大小写不敏感地在字符串中查找一个字符串最后出现的位置</code>
<code>mb_strrpos — 查找字符串在一个字符串中最后出现的位置</code>
<code>mb_strstr — 查找字符串在另一个字符串里的首次出现</code>
<code>mb_strtolower — 使字符串小写</code>
<code>mb_strtoupper — 使字符串大写</code>
<code>mb_strwidth — 返回字符串的宽度</code>
<code>mb_substitute_character — 设置/获取替代字符</code>
<code>mb_substr_count — 统计字符串出现的次数</code>
<code>mb_substr — 获取部分字符串</code>

Time Functions

<code>checkdate — 验证一个格里高里日期</code>
<code>date_add — 别名 DateTime::add</code>
<code>date_create_from_format — 别名 DateTime::createFromFormat</code>
<code>date_create_immutable_from_format — 别名 DateTimeImmutable::createFromFormat</code>
<code>date_create_immutable — 别名 DateTimeImmutable::__construct</code>
<code>date_create — 别名 DateTime::__construct</code>
<code>date_date_set — 别名 DateTime::setDate</code>
<code>date_default_timezone_get — 取得一个脚本中所有日期时间函数所使用的默认时区</code>
<code>date_default_timezone_set — 设定用于一个脚本中所有日期时间函数的默认时区</code>
<code>date_diff — 别名 DateTime::diff</code>
<code>date_format — 别名 DateTime::format</code>
<code>date_get_last_errors — 别名 DateTime::getLastErrors</code>
<code>date_interval_create_from_date_string — 别名 DateInterval::createFromDateString</code>
<code>date_interval_format — 别名 DateInterval::format</code>
<code>date_isodate_set — 别名 DateTime::setISODate</code>
<code>date_modify — 别名 DateTime::modify</code>
<code>date_offset_get — 别名 DateTime::getOffset</code>
<code>date_parse_from_format — Get info about given date formatted according to the specified format</code>
<code>date_parse — Returns associative array with detailed info about given date</code>
<code>date_sub — 别名 DateTime::sub</code>
<code>date_sun_info — Returns an array with information about sunset/sunrise and twilight begin/end</code>
<code>date_sunrise — 返回给定的日期与地点的日出时间</code>
<code>date_sunset — 返回给定的日期与地点的日落时间</code>
<code>date_time_set — 别名 DateTime::setTime</code>
<code>date_timestamp_get — 别名 DateTime::getTimestamp</code>
<code>date_timestamp_set — 别名 DateTime::setTimestamp</code>
<code>date_timezone_get — 别名 DateTime::getTimezone</code>
<code>date_timezone_set — 别名 DateTime::setTimezone</code>
<code>date — 格式化一个本地时间/日期</code>
<code>getdate — 取得日期/时间信息</code>
<code>gettimeofday — 取得当前时间</code>
<code>gmdate — 格式化一个 GMT/UTC 日期/时间</code>
<code>gmmktime — 取得 GMT 日期的 UNIX 时间戳</code>
<code>gmstrftime — 根据区域设置格式化 GMT/UTC 时间/日期</code>
<code>idate — 将本地时间日期格式化为整数</code>
<code>localtime — 取得本地时间</code>
<code>microtime — 返回当前 Unix 时间戳和微秒数</code>
<code>mktime — 取得一个日期的 Unix 时间戳</code>
<code>strftime — 根据区域设置格式化本地时间/日期</code>
<code>strptime — 解析由 strftime 生成的日期/时间</code>
<code>strtotime — 将任何字符串的日期时间描述解析为 Unix 时间戳</code>
<code>time — 返回当前的 Unix 时间戳</code>
<code>timezone_abbreviations_list — 别名 DateTimeZone::listAbbreviations</code>
<code>timezone_identifiers_list — 别名 DateTimeZone::listIdentifiers</code>
<code>timezone_location_get — 别名 DateTimeZone::getLocation</code>
<code>timezone_name_from_abbr — Returns the timezone name from abbreviation</code>
<code>timezone_name_get — 别名 DateTimeZone::getName</code>
<code>timezone_offset_get — 别名 DateTimeZone::getOffset</code>
<code>timezone_open — 别名 DateTimeZone::__construct</code>
<code>timezone_transitions_get — 别名 DateTimeZone::getTransitions</code>
<code>timezone_version_get — Gets the version of the timezonedb</code>

Directory Functions

<code>chdir — 改变目录</code>
<code>chroot — 改变根目录</code>
<code>closedir — 关闭目录句柄</code>
<code>dir — 返回一个 Directory 类实例</code>
<code>getcwd — 取得当前工作目录</code>
<code>opendir — 打开目录句柄</code>
<code>readdir — 从目录句柄中读取条目</code>
<code>rewinddir — 倒回目录句柄</code>
<code>scandir — 列出指定路径中的文件和目录</code>

File System Functions

<code>basename — 返回路径中的文件名部分</code>
<code>chgrp — 改变文件所属的组</code>
<code>chmod — 改变文件模式</code>
<code>chown — 改变文件的所有者</code>
<code>clearstatcache — 清除文件状态缓存</code>
<code>copy — 拷贝文件</code>
<code>delete — 参见 unlink 或 unset</code>
<code>dirname — 返回路径中的目录部分</code>
<code>disk_free_space — 返回目录中的可用空间</code>
<code>disk_total_space — 返回一个目录的磁盘总大小</code>
<code>diskfreespace — disk_free_space 的别名</code>
<code>fclose — 关闭一个已打开的文件指针</code>
<code>feof — 测试文件指针是否到了文件结束的位置</code>
<code>fflush — 将缓冲内容输出到文件</code>
<code>fgetc — 从文件指针中读取字符</code>
<code>fgetcsv — 从文件指针中读入一行并解析 CSV 字段</code>
<code>fgets — 从文件指针中读取一行</code>
<code>fgetss — 从文件指针中读取一行并过滤掉 HTML 标记</code>
<code>file_exists — 检查文件或目录是否存在</code>
<code>file_get_contents — 将整个文件读入一个字符串</code>
<code>file_put_contents — 将一个字符串写入文件</code>
<code>file — 把整个文件读入一个数组中</code>
<code>fileatime — 取得文件的上次访问时间</code>
<code>filectime — 取得文件的 inode 修改时间</code>
<code>filegroup — 取得文件的组</code>
<code>fileinode — 取得文件的 inode</code>
<code>filemtime — 取得文件修改时间</code>
<code>fileowner — 取得文件的所有者</code>
<code>fileperms — 取得文件的权限</code>
<code>filesize — 取得文件大小</code>
<code>filetype — 取得文件类型</code>
<code>flock — 轻便的咨询文件锁定</code>
<code>fnmatch — 用模式匹配文件名</code>
<code>fopen — 打开文件或者 URL</code>
<code>fpassthru — 输出文件指针处的所有剩余数据</code>
<code>fputcsv — 将行格式化为 CSV 并写入文件指针</code>
<code>fputs — fwrite 的别名</code>
<code>fread — 读取文件(可安全用于二进制文件)</code>
<code>fscanf — 从文件中格式化输入</code>
<code>fseek — 在文件指针中定位</code>
<code>fstat — 通过已打开的文件指针取得文件信息</code>
<code>ftell — 返回文件指针读/写的位置</code>
<code>ftruncate — 将文件截断到给定的长度</code>
<code>fwrite — 写入文件(可安全用于二进制文件)</code>
<code>glob — 寻找与模式匹配的文件路径</code>
<code>is_dir — 判断给定文件名是否是一个目录</code>
<code>is_executable — 判断给定文件名是否可执行</code>
<code>is_file — 判断给定文件名是否为一个正常的文件</code>
<code>is_link — 判断给定文件名是否为符号连接</code>
<code>is_readable — 判断给定文件名是否可读</code>
<code>is_uploaded_file — 判断文件是否是通过 HTTP POST 上传的</code>
<code>is_writable — 判断给定的文件名是否可写</code>
<code>is_writeable — is_writable 的别名</code>
<code>lchgrp — 修改符号链接的所有组</code>
<code>lchown — 修改符号链接的所有者</code>
<code>link — 建立一个硬连接</code>
<code>linkinfo — 获取一个连接的信息</code>
<code>lstat — 给出一个文件或符号连接的信息</code>
<code>mkdir — 新建目录</code>
<code>move_uploaded_file — 将上传的文件移动到新位置</code>
<code>parse_ini_file — 解析一个配置文件</code>
<code>parse_ini_string — 解析配置字符串</code>
<code>pathinfo — 返回文件路径的信息</code>
<code>pclose — 关闭进程文件指针</code>
<code>popen — 打开进程文件指针</code>
<code>readfile — 输出文件</code>
<code>readlink — 返回符号连接指向的目标</code>
<code>realpath_cache_get — 获取真实目录缓存的详情</code>
<code>realpath_cache_size — 获取真实路径缓冲区的大小</code>
<code>realpath — 返回规范化的绝对路径名</code>
<code>rename — 重命名一个文件或目录</code>
<code>rewind — 倒回文件指针的位置</code>
<code>rmdir — 删除目录</code>
<code>set_file_buffer — stream_set_write_buffer 的别名</code>
<code>stat — 给出文件的信息</code>
<code>symlink — 建立符号连接</code>
<code>tempnam — 建立一个具有唯一文件名的文件</code>
<code>tmpfile — 建立一个临时文件</code>
<code>touch — 设定文件的访问和修改时间</code>
<code>umask — 改变当前的 umask</code>
<code>unlink — 删除文件</code>
backendprogrammingFunctionsReference
php中文网 Courses
Written by

php中文网 Courses

php中文网's platform for the latest courses and technical articles, helping PHP learners advance quickly.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.