Jump to content

Include Help


gilgimech

Recommended Posts

I've got a header on my site. It has a menu on it that needs to include a script in order for it to work.

 

The problem I'm having, is that the include is requiring me to put the path to the script based on where the menu is being called from.

 

example:

  • If I load the page index.php on the base dir. The path for the include on the menu needs to be /includes/include.php
  • If I load the page contact/contact.php. The path for the include on the menu needs to be ../includes/include.php

 

How can I set the include path so it'll work on all pages?

Link to comment
https://forums.phpfreaks.com/topic/196624-include-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.