akshay Posted February 28, 2010 Share Posted February 28, 2010 Hello. I've noticed this strange path problem. While programming on a PHP server, the path is always '/' (default directory), even if your pages are located in /directory/subdir Example, I had put <iframe src="/ifr_marquee/"></iframe> on the page present in 'web' dir. as: /web/index.php As per the logic, the path of iframe picked by PC should be: /web/ifr_marquee however, it picks /ifr_marquee from 'main' directory. and I'll have to specify full path, i.e. /web/ifr_marquee to tell the server about location of directory. Why is that so? had the page extension been HTML, everything would have worked fine, then why with PHP? Also, other files present in /web/ folder had ../xyz/ (i.e. xyz in main directory). Does that mean ../xyz in a directory, on PHP server = /xyz ? I know, I'm not being very clear. I just want to know why it happens? And Can it be overcome with include_path() ? Thank you! Akshay Quote Link to comment Share on other sites More sharing options...
trq Posted February 28, 2010 Share Posted February 28, 2010 I know, I'm not being very clear. Dead right there. Quote Link to comment Share on other sites More sharing options...
Altec Posted February 28, 2010 Share Posted February 28, 2010 You need to use the relative path, not absolute: "./irf_marquee" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.