Hi, I have a basic curly braces problem. What's the best way to get the current directory name and check for a file? Here's what I'm using -
$s = explode("/", $_SERVER['SCRIPT_NAME']);
$f = "C:\Inetpub\wwwroot\{$s[1]}\header\index.php";
$d = 'C:\Inetpub\wwwroot\siteheader\index.php';
if(is_file($f)) { include($f); }
else { include($d); }
Trouble is, $d becomes "C:\Inetpub\wwwroot{f40carpenters}\header\index.php"
Thanks,