Jump to content

If Then Statement


mcmuney

Recommended Posts

Maybe change it to test the 'REQUEST_URI' server variable... (which is the actual path from the URL)

 

<?php

$page = pathinfo($_SERVER['REQUEST_URI'],PATHINFO_FILENAME);//get the file name of the current page

if($page == "index"){ //it neglects the extension, so hope you don't use index.html too

  echo "Footer HTML you want to show";

}

?>

Link to comment
https://forums.phpfreaks.com/topic/164449-if-then-statement/#findComment-867537
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.