I am wondering if it is possible to get the to pull out just the username.
Here is an example path that I am working with:
/home/UserName/public_html/index.php
The same username is used in the IP link to the folder. Here is an example of what I am using.
http://xxx.xxx.xxx.xxx/~UserName/index.php
I am wondering if I can somehow use php to get this path from my server and then parse out everything but the usrername. I would then like to take that username and make it a variable that I can use else where on the page.
$username = UserName
Does this make sense?
The root issue I am having is that I am using a lot of php includes and I am having an issue with absolute/relative paths. I am thinking that by getting the username, I can make everything an absolute path instead. Maybe I am going about this all wrong.
Any advise would be awesome. Thank you all for your time.
Got it! Here is the code:
In this example if
Then $userid would = USERNAME