Jump to content

server.mappath alike command?


sorex

Recommended Posts

Hello,Is there a way to retrieve the relative path to a given file or url in PHP?in ASP I can use server.mappath("/text/text.txt") which would give me c:\inetput\wwwroot\text\text.txt as result.Can't seem to find something simular for PHP tho ???(unless it's realpath which doesn't seemt to work under XP?)

Link to post
Share on other sites
realpath() seems to be equivalent to ASP's Server.MapPath. On my Win2k box I have successfully used realpath() to give me the full path for a file outside of the document_root. This will be very useful in conjunction with is_dir and/or is_file, which require a full path.
What does it do under XP?
Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...