Tiêu đề: Code PHP hay [In trang] Tác giả: temtem Thời gian: 21-9-2008 01:13 PM Tiêu đề: Code PHP hay Đây là một mã nguồn PHP rất hay,cho phép các bạn liệt kê các file/thư mục có trong thư mục chứa file này + Mở notepad ra + copy toàn bộ mã này
$root='./'; // where to browse, ./ means wherever this script is located in
$rurl='./'; // url to $root, url equivalent of the path. ./ will be the same, relative
$burl='ndv.php?'; // base url, the url to access the indexer in case you are including this script into another one
$surl='ndv.php'; // the absolute url to this script so that it is linked as an image. ex: http://mydomain.com/some/where/out/there/vtc1_info.php
$incl=0; // are you including this page into another one? 1 or yes, 0 for no. Yes means the script will print out <html><head...etc. No means the script will only print out the table.
# end config #######################################################
function e($s){$p=strrpos($s,'.');return substr($s,$p+1,strlen($s));}
function s ($a,$c,$o='asc',$t=SORT_STRING){if(!isset($a[0][$c]))return $a;for ($i=0;$i<count($a);$i++)$temp[$i]=&$a[$i][$c];$o=($o=='asc')?SORT_ASC:SORT_DESC;array_multisort($temp,$o,$t,$a);return $a;}