Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
e6383621
Commit
e6383621
authored
Oct 07, 2006
by
Nigel McNie
Committed by
Nigel McNie
Oct 07, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the correct amount of slashes if the application is installed at the
document root.
parent
29ca4f80
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
htdocs/init.php
htdocs/init.php
+5
-1
No files found.
htdocs/init.php
View file @
e6383621
...
...
@@ -56,7 +56,11 @@ 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'
]))
.
'/'
;
$path
=
substr
(
dirname
(
__FILE__
),
strlen
(
$_SERVER
[
'DOCUMENT_ROOT'
]));
if
(
$path
)
{
$path
.
=
'/'
;
}
$CFG
->
wwwroot
=
$proto
.
$host
.
'/'
.
$path
;
}
// core libraries
...
...
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