Jump to content

PHP Server Path Confusion!


akshay

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.