Current directory
Hopefully this is a simple question with a simple answer!
I need to extract the current directory into a variable. I can easily get the current working directory, but that contains the full path and I only want the last part of it,
e.g.
$folder=getcwd();
echo $folder;
c:\program files\apache group\apache\htdocs\bs\folder1
... when I really just want 'folder1'. Is there an easy way of doing this?
Richard H.
|