Forum Moderators: coopster
trying to make a small function that will determine what directory the file is in, and based on that, display a specific link.
I'm trying to use the request_uri command but I can only put in an exact directory..it doesn't work if you're in a sub-directory of that initial directory. I'll try to explain a little better :)
Here's the code I have now:
---
$url = $_SERVER['REQUEST_URI'];
if($url == '/red-widgets/'){
---
But I want it to work if say someone goes to /red-widgets/small/smallredwidgets.php
Know what I mean? Sorry I'm not the best at explaining this.
Any help would be much appreciated!