I have a folder structure as follows:
mydomain.com ->Folder-A ->Folder-B
I have a string from Database that is \'../Folder-B/imag
dirname(__DIR__,level); dirname(__DIR__,1);
level is how many times will you go back to the folder