分享一个非常实用的代码查看工具
来源:互联网 发布:linux是典型的应用软件 编辑:程序博客网 时间:2024/05/27 01:48
复杂的网站目录结构,想找个文件或模块,忘记在哪里了,或者陌生的目录结构,伤不起啊。。。
干脆为自己打造一个实用的小工具,对于需要研究discuz等优秀网站系统的cooder会有所帮助 <div id="note"> 格式范例:D:/root/discuz 或 D:\root\discuz<br />[注意:不要挑战文件超过<font color="red">3万个</font>的超级目录。否则...]
干脆为自己打造一个实用的小工具,对于需要研究discuz等优秀网站系统的cooder会有所帮助
- <?php
- /*==================================================================*/
- /* 文件名:scandir.php */
- /* 概要: 目录文件遍历并生成文件树. */
- /* 作者: 翻身的咸鱼 */
- /* 创建时间: 2012-04-20 */
- /* 最后修改时间:2012-04-26 */
- /* copyright (c)2012 15053884@qq.com */
- /*==================================================================*/
- $startTime = microtime(true);
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="zh-CN" style="zoom: 100%; ">
- <head>
- <title>目录文件遍历并生成文件树</title>
- <meta http-equiv="Content-Type" content="text/html;charset=gb2312">
- <style>
- #form{
- width:650px;
- float:left;
- border:1px solid gray;
- padding:10px;
- margin:10px;
- font-size:16px;
- }
- #note{
- line-height:35px;
- }
- #exists{
- float:left;
- width:500px;
- border:1px solid gray;
- position:absolute;
- left:700px;
- top:73px;
- padding:10px;
- background:#cccccc;
- }
- #tree{
- border:1px solid gray;
- width:97%;
- float:left;
- padding:10px;
- margin:10px;
- }
- a{
- text-decoration:none;
- }
- input{
- font-size:16px;
- }
- .note{
- padding:10px;
- color:red;
- border:1px solid gray;
- background:#cccccc;
- }
- .message{
- padding:10px;
- border:1px solid gray;
- background:#cccccc;
- }
- </style>
- </head>
- <body bgcolor="#c0dcc0">
- <h3><center>目录文件遍历并生成文件树-->目录文件,一目了然</center></h3>
- <div id="form">
- <form action="" method="POST">
- <div style="height:35px;line-height:35px;">
- 输入文件夹路径: <input type="text" name="path" value="" size="50">
- <input type="hidden" name="rescan" value="false">