<p>How can I get the name of a file in in PHP?   What I want to do is have a function take a string of a filename and then do some stuff if it's actually on the page.</p>

<pre><code>function onThisPageFunction(fileNameFromFunction)  
{  
  if(onThisPage == fileNameFromFunction)  
  {  
    do stuff  
  }  
}
</code></pre>

If I understand correctly you want
```
__FILE__
```
.
Ref:
http://php.net/manual/en/language.constants.predefined.php