Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael R Lundquist
zipAPI
Commits
b4a68189
Commit
b4a68189
authored
Nov 14, 2018
by
michael lundquist
Browse files
Fixing the path issues on the live server and local host.
parent
32342ac6
Changes
1
Show whitespace changes
Inline
Side-by-side
configNuts.php
View file @
b4a68189
<?php
//configure the database name?
if
(
is_dir
(
dirname
(
__FILE__
)
.
"/../zipAPI"
)){
//localhost
echo
"localhost "
.
dirname
(
__FILE__
);
define
(
"PHP_ROOT"
,
$_SERVER
[
"DOCUMENT_ROOT"
]
.
"/zipAPI"
);
define
(
"HTML_ROOT"
,
"/zipAPI"
);
define
(
"URL"
,
"http://127.0.0.1/nuts/nutrition/"
);
}
elseif
(
is_dir
(
dirname
(
__FILE__
)
.
"/../../public_html"
)){
if
(
is_dir
(
dirname
(
__FILE__
)
.
"/../../public_html"
)){
//API
echo
"API "
.
dirname
(
__FILE__
);
define
(
"PHP_ROOT"
,
$_SERVER
[
"DOCUMENT_ROOT"
]);
define
(
"HTML_ROOT"
,
""
);
define
(
"URL"
,
"https://mikeroservices.com/zipAPI/"
);
//can't be www. this is a different domain (cert won't work)
}
elseif
(
is_dir
(
"C:\apache\htdocs\mikeroservices.com\zipAPI"
)){
//localhost
define
(
"PHP_ROOT"
,
$_SERVER
[
"DOCUMENT_ROOT"
]
.
"/zipAPI"
);
define
(
"HTML_ROOT"
,
"/zipAPI"
);
define
(
"URL"
,
"http://127.0.0.1/nuts/nutrition/"
);
}
else
{
exit
(
"configME 2 failure in configNuts.php"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment