|
roaming | As long as PHP is installed on your server, you would change your page extension (on the page with the script) to *.php (i.e. "index.php"). That will tell the server to process the page through the PHP engine rather than as a plain HTML page.
Then you need to add the actual PHP script to the page in question. If you're not using one already, I would strongly recommend using an include for your navigation. That way you only have to change 1 file rather than many, if/when your navigation changes. So the script below would go in your include (if used) or on the calling PHP page if you decide not to use an include.
The script would be something like:
<?php
if (basename($_SERVER['PHP_SELF']) == "index.php") {
//display "Homepage" as plain text (no hyperlink);
}
else {
//display "Homepage" text linked to the index page;
}
?>
Edited by torn 12/9/2014 15:31
| |
|