php列出当前目录下的所有php文件

2015-04-21 0 372
php列出当前目录下的所有php文件

php列出当前目录下的所有php文件

<?php
//Define directory for files listing
//original example
//$files = glob('/path/to/dir/*.xml');
$files = glob('*.php');
//to limit what is displayed you can use a diff listing:
//$files = array_diff($files, array('index.php','opendb.php'));
  
foreach ($files as $value) {
echo "<a href=http://changetoyoursite/$value>".$value."</a><br>";
}
  
  
?>

遇见资源网 php php列出当前目录下的所有php文件 http://www.ox520.com/7572.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务