Xamp - can't find my local pages
-
- 3StarLounger
- Posts: 293
- Joined: 26 Mar 2010, 10:53
Xamp - can't find my local pages
I've set up xamp to use as a local server. It all appears to be working correctly except that when I try to view a local website page I'm getting a server not found message. It did work a while ago so I don't know what has changed. I've checked the httpd-vhosts.conf file and the hosts file and I can't see any errors. Anyone using xamp successfully? Anyone know of any good tutorials I can read through so I can double-check my settings? Thanks.
-
- 3StarLounger
- Posts: 293
- Joined: 26 Mar 2010, 10:53
Re: Xamp - can't find my local pages
Managed to get it working. Now I have a new question. Using php is it possible to check whether a local server or testing server is being used rather than an online one? Cheers
-
- 3StarLounger
- Posts: 293
- Joined: 26 Mar 2010, 10:53
Re: Xamp - can't find my local pages
I found a simple strlen is working for my purposes:
_offline_site is the folder containing my web files. I don't have a folder by that name on my actual site.
Code: Select all
if (strpos($_SERVER['DOCUMENT_ROOT'], '_offline_site') !== FALSE)
{
echo 'Found it';
}
else
{
echo 'Not Found';
}