Page 1 of 1

Parse error: parse error, unexpected $end in c:\websites\adm

Posted: Wed Jun 22, 2005 7:25 pm
by psychotomus
cant find cause of error.

Parse error: parse error, unexpected $end in c:\websites\admin\videogam\www\test.php on line 50

Code: Select all

<?php

//add downloads to table
$dir = "Midis/";
$MidiCount = 0;
if ($dh = opendir($dir))
{
	//get console directory
	while(false !== ($filename2 = readdir($dh)))
	{
		
		if (is_dir($dir.'/'.$filename2))
		{
			if ($filename2 <> "..")
			{
			$bh = opendir($dir.'/'.$filename2);
			//get game directory
			while(false !== ($filename1 = readdir($bh)))
			{
				if (is_dir($dir.'/'.$filename2.'/'.$filename1))
				{
					if (($filename2 <> ".."))`
					{
						$ch = opendir($dir.'/'.$filename2.'/'.$filename1);
						//get games
						while(false !== ($filename3 = readdir($ch)))
						{
							if (!(is_dir($dir.'/'.$filename2.'/'.$filename1.'/'.$filename3)))
							{
								print $dir.'/'.$filename2.'1/'.$filename1.'2/'.$filename3.'3<br>';


								//$MidiCount = $MidiCount + 1;
								//$filename1 = str_replace("'", "", $filename1);
								//mysql_query ("INSERT INTO Downloads(filename, theconsole,  Downloads) VALUES ('$filename3', '$filename2','0')") 
					//or die(mysql_error());
							}//endif
						}//endwhile
					}//endif
				}//endif
			}//endwhile
			}//endif
		}//end if of is_dir


	}//end of while
}//end if opendir


?>
JCART | Please use

Code: Select all

tags when posting php code. Review [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Wed Jun 22, 2005 7:39 pm
by John Cartwright

Code: Select all

if (($filename2 &lt;&gt; &quote;..&quote;))`