Help me with some php

Hi all,

Let me preface by saying I know NO php so this will probably be an easy question but I’m just a php-moron so don’t laugh at me please.

Okay, I have a cool photo stack fla that reads an xml and a php file to load the photos. In the original file the photos were all on the same directory level as the swf, php, and xml files. I altered it to have the photos in a directory called “pics” which the xml has no trouble reading. Everything works great when tested on my machine but when I load everything up onto my server the only photo being read is one that is on the same level as the files, not the subdirectory of “pics”. I’m taking a big guess here thinking that it’s something to do with the php file. Here is the code it contains:


<?
$xml = '<?xml version="1.0"?'.'>';
$handle = opendir(".");
while ( ($file=readdir($handle)) !== false ) {
	if ( !is_dir($file) ){
		$pic = @getimagesize($file);
		if($pic != false && $pic[2] == 2){
			$xml .= '<img src="'.$file.'" width="'.$pic[0].'" height="'.$pic[1].'" />';
		}
	}
}
echo $xml;
?>

If this isn’t it I’ll try something else but if it is it would make my day if someone could point out what I’m missing.

:hr: