sorex Posted October 23, 2006 Share Posted October 23, 2006 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 comment Share on other sites More sharing options...
justsomeguy Posted October 23, 2006 Share Posted October 23, 2006 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 comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now