SyntaxFix
Write A Post
Hire A Developer
Questions
$_SERVER["PHP_SELF"]; will give you the current filename and its path, but basename(__FILE__) should give you the filename that it is called from.
$_SERVER["PHP_SELF"];
basename(__FILE__)
So
if(basename(__FILE__) == 'file_name.php') { //Hide } else { //show }
should do it.