Is there a function that returns the directory that you’re currently working in? I don’t mean everything from the root; I want JUST the current directory name, that’s all. I was looking, but didn’t find one.
That would be the get current working directory command: getcwd()
Which you then process to get the last directory name, perhaps by using basename()
Or if you mean the directory name of the current script file then you can achieve with [fphp]dirname()[/fphp]:
No, he doesn’t want the full directory name from the root, he only wants the last part of the directory path
To achieve that means using basename() as well.
Agreed to use basename() to find the trailing name but only if he meant the directory name of currently working script file name.
Okay, we’ll leave that up to the OP.
dirname() for the directory of the currently executing php script
or getcwd() for the current working directory
The badge is pretty good. Congratulation once again Paul!
Ooh pretty! I hadn’t noticed before, so thanks for mentioning it.
Thank you very much for the suggestions, I will definitely try them out and see if I can get it to do what I need