本文实例讲述了PHP使用glob函数快速查询指定目录文件的方法。分享给大家供大家参考。具体如下:
代码如下:
/
Array
(
[0] => 1.PHP
[1] => 10.PHP
[2] => 11.PHP
[3] => 2.asp
[4] => 3.asp
[5] => 4.aspx
[6] => 5.html
[7] => 6.PHP
[8] => 7.PHP
[9] => 8.PHP
[10] => 9.PHP
)
/
Array
(
[0] => 1.PHP
[1] => 10.PHP
[2] => 11.PHP
[3] => 2.asp
[4] => 3.asp
[5] => 4.aspx
[6] => 5.html
[7] => 6.PHP
[8] => 7.PHP
[9] => 8.PHP
[10] => 9.PHP
)
/
搜索以.PHP结果的PHP文件,代码如下:
<div class="codetitle"><a style="CURSOR: pointer" data="12007" class="copybut" id="copybut12007" onclick="doCopy('code12007')"> 代码如下: