Jump to content

[SOLVED] URL Identify


Monk3h

Recommended Posts

The following script is suposed to change the text to a link if it is not displayed on my home page.

 

 

My problem is that it does not work, i think this is because my home page is in a directory higher than www.

 

the full path to my home page is portfolio/4/index.php

 

How would i change my script to check there without using the full path?

 

<?php
        $homepage = "/";
        $currentpage = $_SERVER['REQUEST_URI'];
        if($homepage==$currentpage) {
        Print "<span style=color:#f0f492>Home</span>";
        }else{
	Print "<span style=color:#999999><a href='index.php'>Home</a></span>";

	}
    ?>

Link to comment
https://forums.phpfreaks.com/topic/169234-solved-url-identify/
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.