views:

68

answers:

1
+2  Q: 

PHP Link problem

Hello,

I have a head file which I am using for a few different pages. The problem is when I go into a folder, the links in the head file point to say index.php instead of ../index.php

Is there any function to fix this or any work arounds that I'm missing?.

Thanks! ~ Kyle G

+3  A: 

The links in the HTML? if so you can use absolute paths in your links. eg linking like so: <a href="/index.php">

If you're talking about include()/require() then one solution is to set your include path.

Or you could never serve html from subdirectories :) that's worked for me so far.

JasonWoof