| GrImBlY 2004-08-29, 8:55 am |
| Hi everyone,
I have a technical question which I hope you can help me with.
Basically I'm developing a site and have decided that using Dreamweaver's
Templates is a pain in the arse and I'm using an 'Include' instead which
works like a charm.
However, it works fine on my testing server, but not on the remote server as
the Include comes up with an error if I try Include without a full URL. I've
managed to get it to work by using
Include ('http:\\www.myurllocation.com\thefilename.txt');
But it's really annoying to have to change the header and footer of each
..php file before I upload them. Is there a way of using PHP to detect if
it's on the testing server or remote server ?
Basically I'd like something like this
If Server=Local
{
Include ('file.txt');
}
Else
{
Include ('http:\\www.mysiteurl.com\file.txt');
}
EndIf
Can anyone help ?
Thanks in advance.
|