Jump to content

Name of file being viewed


haydndup

Recommended Posts

How would i get php to find the name of the file being viewed?
ie -> i have a 'left.php' which is included in all pages on a site. But i want this content to change based on which file is viewing it ->index.php, about.php, contact.php etc. I want to use a set of if statements to determine the name of the file being viewed, and based on that, echo out content that is page specific...

I hope this makes sense..
TIA
Link to comment
https://forums.phpfreaks.com/topic/10568-name-of-file-being-viewed/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.