@NogDogJul 25.2008 — #You need to quote "index.php", plus put the conditional within parens, and use "==" not "=" to do the comparison: [code=php] <?php if($_SERVER['PHP_SELF'] == "index.php") echo "This IS Index"; else echo "This IS NOT Index"; ?> [/code]
@bokehJul 26.2008 — #Well first you need to know whether or not you are. If it is a shared server CGI offers much better security characteristics. How not to run in CGI mode? Host on a server that doesn't use this configuration.
@NogDogJul 26.2008 — #So it looks like that works. If you just want the file name and don't care about the directory stuff, you can filter it through the basename() function: [code=php] if(basename($_SERVER['SCRIPT_NAME']) == 'index.php') { [/code]