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 Link to comment https://forums.phpfreaks.com/topic/193638-php-server-path-confusion/ 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. Link to comment https://forums.phpfreaks.com/topic/193638-php-server-path-confusion/#findComment-1019314 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" Link to comment https://forums.phpfreaks.com/topic/193638-php-server-path-confusion/#findComment-1019316 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.