By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,480 Members | 1,229 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,480 IT Pros & Developers. It's quick & easy.

php resole relative to absolute

P: 2
Hello ,

I am a new in PHP.I have a task to resolve realtive path to absolute path.
for example :
../default/test.png -> /image/default/test.png
I have done it with string replace function.but,this is not the solution.I need to resolve the relative path with base path such as

It's also possible the relative path would be like this "test.png".I have to resolve this also with the absolute path.

I have tried with so many function which are availaible on the Google:-).Still,I am not getting the certain result.

Any help would be appreciated.

Thanks In Advance :-)
Mohamad Mujtaba Ahmed
Apr 20 '10 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 8,639
check out realpath().
Apr 21 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.