Say I have a file called example.php
It is located in public_html/files/test/example.php
How would I print the name of the folder, "test"?
In other words, what I want to do is show the location of the file, for use in some strings and such. But instead of making 20 different files (as this file will be used in several folders) I want to be able to find out the name of the folder it is in and print that.
Say it was at www.hbgames.tk/example/gatorade/example.php
-- I want to return "gatorade".
Any ideas?
It is located in public_html/files/test/example.php
How would I print the name of the folder, "test"?
In other words, what I want to do is show the location of the file, for use in some strings and such. But instead of making 20 different files (as this file will be used in several folders) I want to be able to find out the name of the folder it is in and print that.
Say it was at www.hbgames.tk/example/gatorade/example.php
-- I want to return "gatorade".
Any ideas?