简单的PHP问题:
为什么这样做,
$exclude_exts = array('js', 'css',);
$filename = "test.css";
$ext = explode('.',$filename);
$is_excluded = in_array(strtolower(array_pop($ext)), $exclude_exts);
Run Code Online (Sandbox Code Playgroud)
但事实并非如此.
$exclude_exts = array('js', 'css',);
$filename = "test.css";
$is_excluded = in_array(strtolower(array_pop(explode('.',$filename))), $exclude_exts);
Run Code Online (Sandbox Code Playgroud)
编辑:两者都曾用于以前版本的PHP(我忘了哪个版本).
| 归档时间: |
|
| 查看次数: |
134 次 |
| 最近记录: |