PHP Includes Issue

  • From: "Peter Donahue" <pdonahue1@xxxxxxxxxxxxx>
  • To: <nfb-web@xxxxxxxxxx>
  • Date: Sun, 26 Oct 2008 16:06:17 -0500

Good afternoon everyone,

       A number of Web sites I manage were recently moved to a new server. 
They use PHP includes for displaying content common to all site pages. On 
the old server I used absolute paths for these includes. I'm not sure which 
version of  PHP was in use on that machine, but all worked fine. No matter 
if pages were located in the root folder, or in sub folders the includes 
loaded fine. On the new machine they're not loading at all unless the site 
pages are located in the root folder, and the absolute path is removed.

    I have two options and am not sure which is the best fix for this 
situation. I'd like to continue using PHP, hut don't care to have to update 
umpteen includes and footer files for pages stored in umpteen site folders. 
I need to know from a PHP guru is there is a fix for this situation that 
will cause my includes to be displayed on pages located in subfolders, or do 
I need to do things the hard way?If someone has code that I can add that 
will cause PHP includes to be displayed regardless of a page's location on 
the server that will be very much appreciated.

    This server also supports Server-Side Includes which load on pages in 
any location on the server. One of the sites I manage was created using SSI. 
The include loads on  all site pages some of which are located in 
subfolders. The question is can I continue to build these sites using PHP, 
or should I convert them over to Server-Side Includes to fix this problem? 
Suggestions and PHP code snippids to add to the PHP include tag will be very 
helpful. I need to move on this as four Web sites are effected by this 
problem. Thanks for your help.

Peter Donahue



"Given a chance to dream it can be done.
The promise of tomorrow is real.
Children of Spaceship Earth the future belongs to us all."
Flying for Me,
John Denver 

__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts:

  • » PHP Includes Issue