PDA

View Full Version : if (File_Exists())


Enverex
9 Jun 2003, 06:29pm
$MTheme="/files/gamethemes/";

if (file_exists($MTheme . $File.".zip")){$Theme = "<a href=\"".$MTheme."".$File.".zip\">Theme Tune</a>";}
else{$Theme = "No Theme";};

Always seems to return the Else statement.
Using -

$MTheme . $File.".zip"

Returns the right file, so, any ideas?

NS

Enverex
9 Jun 2003, 06:53pm
Used -

$themefile="".$MTheme."".$File.".zip";

if (file_exists($themefile)){$Theme = "<a href=\"".$MTheme."".$File.".zip\">Theme Tune</a>";}
else{$Theme = "No Theme";};

Honestly wasnt expecting to get it working so fast, makes the thread a bit pointless :p

See it in use here - http://atomnet.co.uk/amiga/?p=gs&letter=W

NS