INCLUDE when moving to another host [SOLVED]
Posted: Wed Nov 16, 2011 11:34 am
Hi all
I'm after a bit of advice if I may.
I use INCLUDE a lot on my sites for things like site headers and footers and connection stings to SQL databases.
MY include statements look something like
include('/home/content/29/7034929/html/scripts/header.php');
Which is great and works for me...however I am about to move a site to a new host and initial part of the include path is going to change which means I am going to have to run through replacing the path with the new one in many places.
So as to avoid this problem in the future how should I correctly set the path so I need only to change it in minimal locations? In the php.ini file maybe or set the path as some sort of global variable or session variable.
Also am I correct in my understanding that I am talking about the absolute path in this example?
Any help and suggestions greatly appreciated.
Many thanks
Chris
I'm after a bit of advice if I may.
I use INCLUDE a lot on my sites for things like site headers and footers and connection stings to SQL databases.
MY include statements look something like
include('/home/content/29/7034929/html/scripts/header.php');
Which is great and works for me...however I am about to move a site to a new host and initial part of the include path is going to change which means I am going to have to run through replacing the path with the new one in many places.
So as to avoid this problem in the future how should I correctly set the path so I need only to change it in minimal locations? In the php.ini file maybe or set the path as some sort of global variable or session variable.
Also am I correct in my understanding that I am talking about the absolute path in this example?
Any help and suggestions greatly appreciated.
Many thanks
Chris