Need help with a tutorial

I am trying to create a file browser for my own but based on a tutorial found in this URL:…ernal_array.htm .

Now, i have one prob. If i use the url for the php specified in the tutorial and point it to kirupa everything works great. Problems have reach when i transfer the php file without change it any bit to my own server and i just uploaded some jpg´s to the same folder at my server. In here.

After this although i had give permissions to the file when trying to load the file to Flash it won’t trace the jpg´s i have in there. But if i trace the (lv) it traces exactly how it does with kirupa file except the files are different. After that any file traces undefined.

What is the prob? Do i need something else on my server? Do i need some kind of server side software installed for this to work?

The fla for this has only the following code:

files = new Array();
lv = new LoadVars();
lv.onLoad = function() {
	fl = this.filelist;
	files = fl.split(",");
	c = files.length-1;
	for (i=0; i<c; i++) {
// like this it will work. loading in kirupa

And the php is :

if ($handle = opendir('.')) {

echo "filelist=";
while (false !== ($file = readdir($handle))) {

$ext = substr(strrchr($file, "."), 1);
if ($file != "." && $file != ".." && $ext == "jpg") {

echo "$file";
echo ",";


echo "null";


I really appreciate some help on this.

Many thanks.