Cuối chương trình, nhưng để xây dựng câu trả lời được chấp nhận ...
Nếu bạn muốn có tất cả các tệp và thư mục trong AS mảng [có thể được trang bị độc đáo với JSON.Stringify trong JavaScript], bạn có thể sửa đổi chức năng thành:
function listFolderFiles[$dir] {
$arr = array[];
$ffs = scandir[$dir];
foreach[$ffs as $ff] {
if[$ff != '.' && $ff != '..'] {
$arr[$ff] = array[];
if[is_dir[$dir.'/'.$ff]] {
$arr[$ff] = listFolderFiles[$dir.'/'.$ff];
}
}
}
return $arr;
}
Cho những người mới ...
Để sử dụng JSON.stringify
đã nói ở trên, JS/JQuery của bạn sẽ giống như:
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
^ Điều này giả sử bạn có một yếu tố trong HTML của bạn ở đâu đó. Bất kỳ hương vị nào của Ajax sẽ làm, nhưng tôi cho rằng hầu hết mọi người đang sử dụng một cái gì đó tương tự như jQuery ở trên.
Và PHP đi kèm:
if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
nơi bạn đã có listFolderFiles
từ trước.
Trong trường hợp của tôi, tôi đã đặt $rootPath
của mình thành thư mục gốc của trang web ...
$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
Kết quả cuối cùng là một cái gì đó giống như ...
| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
Lưu ý: Bạn sẽ không giống hệt như thế này - Tôi đã sửa đổi JSON.stringify
để hiển thị các tab [đường ống dọc], căn chỉnh tất cả các giá trị có khóa, loại bỏ trích dẫn của các phím và một vài thứ khác. Tôi sẽ sửa đổi câu trả lời này với một liên kết nếu tôi có thể tải lên nó hoặc nhận đủ sự quan tâm.
Xem thảo luận
Cải thiện bài viết
Lưu bài viết
Xem thảo luận
Cải thiện bài viết
Lưu bài viết
Đọc
Explaination: In our
PHP code, initially, it is checked whether provided path or filename is a directory or not using is_dir[] function. Now, we open the directory using opendir[] function and then checking whether it is getting opened or have some errors. Then we use a while loop to get names of all the subfolders, as well as files, present inside the directory with the help of readdir[] function. Now we are going inside each subfolder and reading the names of all the files present inside them
following a similar procedure.
Folder Structure:
Bàn luận
Note: This Code have been saved as PHP file and accessed through wampserver
Với đường dẫn của thư mục và tác vụ là in tên của các thư mục con và tệp có bên trong chúng. Giải thích: Trong mã PHP của chúng tôi, ban đầu, nó được kiểm tra xem đường dẫn được cung cấp hoặc tên tệp có phải là thư mục hay không sử dụng hàm is_dir []. Bây giờ, chúng tôi mở thư mục bằng hàm opendir [] và sau đó kiểm tra xem nó đang được mở hoặc có một số lỗi. Sau đó, chúng tôi sử dụng một vòng lặp trong thời gian để lấy tên của tất cả các thư mục con, cũng như các tệp, xuất hiện bên trong thư mục với sự trợ giúp của hàm readDir []. Bây giờ chúng tôi sẽ đi vào bên trong mỗi thư mục con và đọc tên của tất cả các tệp có bên trong chúng theo một quy trình tương tự.
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
0Mã: & nbsp; Lưu ý: Mã này đã được lưu dưới dạng tệp PHP và được truy cập thông qua WampServer & NBSP; & NBSP;
PHP
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
1 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
2var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
3var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
4var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
5 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
7var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
1$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
1$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
2 $rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
3$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
4 $rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
5if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
222$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
8var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
5 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
4 | some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
2| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
3 | some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
4$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
4 | some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
2__| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
9JSON.stringify
0 JSON.stringify
1 JSON.stringify
2$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
4 JSON.stringify
4| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
9JSON.stringify
6JSON.stringify
7JSON.stringify
8JSON.stringify
90
1
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
2var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
3
4$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
4
4__| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
9var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
5 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
7var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6
1if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
0listFolderFiles
6listFolderFiles
7
if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
3
1if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
5$rootPath
1
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
5 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6______777$rootPath
6
$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
2 $rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
3$rootPath
9 $rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
5______77770
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
5 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
6$rootPath
9 | some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
2| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
3 | some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
4$rootPath
9listFolderFiles
6JSON.stringify
0 $rootPath
9 4
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
08var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
4var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
10var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
12var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
14var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
16var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11
$rootPath
6
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11| some_file_1487.smthng []
| some_file_8752.smthng []
| CSS
| | some_file_3615.smthng []
| | some_file_8151.smthng []
| | some_file_7571.smthng []
| | some_file_5641.smthng []
| | some_file_7305.smthng []
| | some_file_9527.smthng []
|
| IMAGES
| | some_file_4515.smthng []
| | some_file_1335.smthng []
| | some_file_1819.smthng []
| | some_file_9188.smthng []
| | some_file_4760.smthng []
| | some_file_7347.smthng []
|
| JSScripts
| | some_file_6449.smthng []
| | some_file_7864.smthng []
| | some_file_3899.smthng []
| | google-code-prettify
| | | some_file_2090.smthng []
| | | some_file_5169.smthng []
| | | some_file_3426.smthng []
| | | some_file_8208.smthng []
| | | some_file_7581.smthng []
| | | some_file_4618.smthng []
| |
| | some_file_3883.smthng []
| | some_file_3713.smthng []
... and so on...
9JSON.stringify
0 var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
08var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
40
var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11$rootPath;
if[!isset[$rootPath]] {
$rootPath = $_SERVER['DOCUMENT_ROOT'];
}
1var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
6var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11if[isset[$_POST['list_dirs']]] {
echo json_encode[listFolderFiles[$rootPath]];
exit[];
}
1var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
11var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
33var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
34var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
35var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
36var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
37var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
38var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
39var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
40var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
41var ajax = $.ajax[{
method: 'POST',
data: {list_dirs: true}
}].done[function[msg] {
$['pre'].html[
'FILE LAYOUT
' +
JSON.stringify[JSON.parse[msg], null, 4]
];
}];
42Output: