8
I Googled and here on Sopt, but I did not find any site, or question here that would answer this question.
Example:
I’m on the page index.php
who is in /5/index.php
, then only the 5.
How to print this on the page?
What is the simplest and most practical way to get the directory name in PHP ?
Very simple question, but I did not find any useful method to get this information. : P
could you give an example of use? : P
– Alexandre Lopes
@Alexandrelopes joined example
– Sergio
What a beautiful answer! Kkkk, it’s perfect! So that’s it
basename(__DIR__)
, Thank you @Sergio helping me always! : P– Alexandre Lopes