(PHP 5 >= 5.1.0, PHP 7, PHP 8)
spl_autoload_extensions — 注册并返回 spl_autoload 的默认文件扩展名
file_extensions
如果为 null
,只返回当前扩展名列表,每个扩展名用逗号分隔。要修改文件扩展名列表,只需在单个字符串中,用逗号分割的新文件扩展名列表调用此函数即可。
逗号分隔的 spl_autoload() 的默认文件扩展名。
版本 | 说明 |
---|---|
8.0.0 | file_extensions 现在可以为 null。 |
示例 #1 spl_autoload_extensions() 示例
<?php
spl_autoload_extensions(".php,.inc");
?>