Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
bd724f4e
Commit
bd724f4e
authored
Oct 06, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 06, 2006
Browse files
Fixed up wwwroot generation to work properly in a subdirectory.
parent
ee1709a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/init.php
View file @
bd724f4e
...
...
@@ -56,8 +56,7 @@ foreach (array('docroot', 'dataroot') as $path) {
if
(
!
isset
(
$CFG
->
wwwroot
))
{
$proto
=
(
isset
(
$_SERVER
[
'HTTPS'
]))
?
'https://'
:
'http://'
;
$host
=
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
]))
?
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
]
:
$_SERVER
[
'HTTP_HOST'
];
$CFG
->
wwwroot
=
$proto
.
$host
.
substr
(
dirname
(
__FILE__
),
strlen
(
$_SERVER
[
'DOCUMENT_ROOT'
]))
.
'/'
;
//if (false !== strpos($_SERVER['REQUEST_URI'], 'admin')) {print_r($_SERVER);echo $CFG->docroot;echo $CFG->wwwroot;}
$CFG
->
wwwroot
=
$proto
.
$host
.
'/'
.
substr
(
dirname
(
__FILE__
),
strlen
(
$_SERVER
[
'DOCUMENT_ROOT'
]))
.
'/'
;
}
// core libraries
...
...
Write
Preview
Supports
Markdown
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