Msg#: 3610536 posted 10:19 pm on Mar 25, 2008 (gmt 0)
So in my PHP include I have three links and they all look like this ../index.php I have three different folders in my site root. My problem is I can't get the links to work for all three of the folders. If I do the relative link like this index.php then it works for the other half. Do I have to do absolute links then for the php include? Thanks
Msg#: 3610536 posted 2:08 am on Mar 26, 2008 (gmt 0)
This still might be an html issue. Are each of these directories only one level deep? If so, then ../ will take you back to the domain root - and index.html would be the bare domain's index page. If some uses of the include are more than one folder deep, then you need ../../
The big question is what does "work" mean - are you trying to send the user to the domain root? If so, then it's not a good practice to use index.html - use http://www.example.com/ instead. If you're trying to send people to the home page of the same directory where the include is being used, then you don't need any ../ at all.