Page is a not externally linkable
penders - 11:10 am on Jun 29, 2009 (gmt 0)
This is never going to evaluate to true since "home/beta/public_html/" (the server-side path) is never going to be part of the REQUEST_URI (client-side URL as seen in the browser). To target just the file, you could do: To check if you are in any file in the web root, you could check for any more '/' after the first one in PHP_SELF, if there are then you are in a sub folder, if not then you are in the web root.
if(stristr($_SERVER['REQUEST_URI'], "home/beta/public_html/"))
$folder = "home";I simply want to target the index.php on my server which is located in the root... if ($_SERVER['PHP_SELF'] == '/index.php')
$folder = 'home';if (strpos($_SERVER['PHP_SELF'],'/',1) === false)
$folder = 'home';