configNuts.php 929 Bytes
Newer Older
1
2
<?php
//configure the database name?
3
define("PHP_ROOT", $_SERVER["DOCUMENT_ROOT"]."/zipAPI");
michael lundquist's avatar
michael lundquist committed
4

5
if(strpos(PHP_ROOT,"public_html") !== FALSE){
6
	//API
7
	define("HTML_ROOT", "");
8
	define("URL", "https://mikeroservices.com/zipAPI/");//can't be www. this is a different domain (cert won't work)
9
10
11
}elseif(is_dir("C:\apache\htdocs\mikeroservices.com\zipAPI")){
	//localhost
	define("HTML_ROOT", "/zipAPI");
12
	define("URL", "http://127.0.0.1/mikeroservices.com/zipAPI");
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
}else{
	exit("configME 2 failure in configNuts.php");
}

//https://stackoverflow.com/questions/22912121/php-include-absolute-path


/*
Notes to self:
	header looks for relative links starting in this directory (SMSsecrets\capcha)
	if you don't specify the protocol, this thinks your link is relative

NOte: 
*/
function linkNdie($failure_link, $message = "captcha unsuccessful, try again "){
	header("Location: ".$failure_link, TRUE);
	exit($message.$failure_link);
}
?>