SyntaxFix
Write A Post
Hire A Developer
Questions
Actually I found the best solution is the following:
$cur_dir = explode('\\', getcwd()); echo $cur_dir[count($cur_dir)-1];
if your dir is www\var\path\ Current_Path
then this returns Current_path