We have 18 guests and 1 member online
PHP Scripts arrow Listing Script

Free PHP Scripts by Gscripts.net

AJAX File BrowserPopular - PHP Script


This is a file browser made in PHP5 so you will need this for it to work. It's all Ajax so you'll get a directory tree without having to make read all the directories at once. It's been made so that you can incorporate it in your scripts with minimum hassle.

Step 1: Upload the files on your server.

Step 2: Edit the config.php file to allow selected file extensions and select the path you want to read

That's all!!!


A template is provided in index.php. The code is pretty self explanatory so you can edit it quite easily to suit your specifications.




Average Visitor Rating: 2.92 (Out of 5)
Number of ratings: 174

Select your rating
Excellent  Good  Average  Fair  Poor 
Script Details
Free Demo: Demo
Free Download: Download
Average Visitor Rating: 2.92 (Out of 5)
Number of ratings: 174
Hits: 80849
Added: 2006-11-23 14:44:23
Last updated: 2007-01-22 02:55:55

Reviews (11)
Fix for FireFox issue
Scrip Reviewed by haixu, 2011-05-18

if(typeof(xmlDoc.getElementsByTagName("result")[0].textContent) != "undefined")
{
result = xmlDoc.getElementsByTagName("result")[0].textContent;
}
else
{
result = xmlDoc.getElementsByTagName("result")[0].firstChild.data;
}

AJAX File Browser - FF Fix
Scrip Reviewed by psyray, 2009-04-26

i made a capture of the fix, my code is always truncated on this review system
http://yfrog.com/b8browsej

AJAX File Browser - FF Fix
Scrip Reviewed by psyray, 2009-04-21

Hi,
seems this site blocking some special chars, so my fix was not correctly published.

For those who want to understand why it doesn't work in FF -> FF is chunking XML child nodes data into multiple 4096 bytes chunks.
So we have, in this case, to loop into the childNodes array and concatenate data in result var.

Here is the fix :
browse.js - Line ~150

replace

result = xmlDoc.getElementsByTagName("result")[0].firstChild.data;

by

for(i=0;i

Firefox problem
Scrip Reviewed by valbarel, 2009-03-13

@mj : the displayed solution
for(var i = 0; i childNodes[i].data; }
is not syntaxically correct.
Could you publish the right code ?

firefox fix
Scrip Reviewed by mj, 2009-03-03

Figured out how to fix firefox dirListing..
this might not be the best way but..

in browse.js replace line
result = xmlDoc.getElementsByTagName("result")[0].firstChild.data;

with this

for(var i = 0; i childNodes[i].data; }

Great script but..
Scrip Reviewed by mj, 2009-02-20

This thing works!

But not in firefox by default. I'd like to try fix that psyray commented. Looks like something is missing from that fix?

With what I should replace line:
result = xmlDoc.getElementsByTagName("result")[0].firstChild.data;

???

Please post a proper fix here!

AJAX File Browser - FF Fix
Scrip Reviewed by psyray, 2009-01-16

hi,

To make it working in firefox (full directory listing) change this line in browse.js

result = xmlDoc.getElementsByTagName("result")[0].firstChild.data;

by this

for(i=0;ion in responseText. The data cannot exceed 4096 bytes by node. So we have to loop and concatenate data.

Great piece of code. Really useful.
Thanks

excellent script till date
Scrip Reviewed by Arun.S, 2008-08-29

This supports all files display. Only thing you got to change to display a specific file is to remove it from the invalid files variable in config.php and there you have it...... It displays everything there.......

Noticed an error
Scrip Reviewed by User, 2008-04-14

This is being used at tafe to serve out files for our classes by one lecturer, i've noticed that in Firefox, it will not display all the files and folders, and that some do not get sorted properly (eg wk10 stuff being up near wk1 because it doesnt sort by the whole filename)

apart from that i think its quite cool, well done

Bug
Scrip Reviewed by Scott, 2008-04-03

This script has a bug in it. It only supports small sets of files, subfolders, etc.

<< Start < Prev 1 2 Next > End >>
Results 1 - 10 of 11

Directory Stats

There are 1037 listing and 46 categories in our website

Change Language