Hello and welcome to beautiful Jun Blog.

Archive for 八月 2nd, 2008

非常好的目录导航文件php代码

Tags:.

这个代码虽然短小,但很实用,它可以轻松建立你指定的目录里的指定后缀名文件的超连接,而且可以设定,不会将指定的目录首页导航。

  1. <?php 
  2. function navbar()
  3. { 
  4. $files = dir("."); //指定目录
  5.  
  6. $pipe = " | "; //管道符
  7.  
  8. //通过以下的循环搜索目录中所有文件
  9. while ($current = $files->read()) 
  10. { 
  11.  
  12. //ignor all files not of htm type.
  13.  
  14. if (strpos($current, "php")!= FALSE) //设定后缀为PHP的文件将被导航
  15.  
  16. //忽略自己(如 index.html)
  17.  
  18. { 
  19. if (strpos($current, "ndex") == FALSE) 
  20.  
  21. { 
  22.  
  23. print "";
  24. print $current;
  25. print "";
  26. print $pipe;
  27.  
  28. };
  29. };
  30. };
  31.  
  32. };
  33. navbar() //调用函数
  34. ?>

Posted on 2 八月 '08 by admin, under php. No Comments.

CSS框架 – blueprint(蓝图)

Tags:.

blueprint(蓝图)是一个CSS框架,其目的是减少对你的CSS开发时间。

(全文…)

Posted on 2 八月 '08 by admin, under CSS. No Comments.