sftravel2002 Posted December 14, 2008 Share Posted December 14, 2008 I am modifying a large website which you can see an example of at this link: http://www.sftravel.com/food.html The site uses php to insert left navigation menus, headers, footers, etc. via an include folder in the site's root directory. The site contains a large variety of existing html files (to be upgraded) in other subdirectories and nested subdirectories. My programming team is having challenge / questions in easily referencing the include directory for the root directory - when the html files are in the subdirectories. Are there ways to solve this challenge? We also don't want to have to repeat the include files in every subdirectory - we want them referenced from a central spot. I'll happily send $10 via Paypal to the first person to cleanly help me figure this out. Link to comment https://forums.phpfreaks.com/topic/136943-php-subfolders-and-includes-dillemma/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 14, 2008 Share Posted December 14, 2008 Form an absolute file system path using $_SERVER['DOCUMENT_ROOT'] - require $_SERVER['DOCUMENT_ROOT'] . '/your_include_path/your_include_file.php'; Link to comment https://forums.phpfreaks.com/topic/136943-php-subfolders-and-includes-dillemma/#findComment-715223 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.