ASP MapPath -> PHP [renamed]

in php how can i do this? that i do in asp

Server.mapPath("./folder/file.txt")

i mean, get the url and add the new stuff…