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
555047e1
Commit
555047e1
authored
Oct 03, 2006
by
Penny Leach
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beginning of init.php
parent
7274231f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
htdocs/init.php
htdocs/init.php
+43
-0
No files found.
htdocs/init.php
0 → 100644
View file @
555047e1
<?php
/**
* This file is part of maraha.
*
* maraha is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* maraha is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with maraha; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
// set up basic error handling here
unset
(
$CFG
);
$CFG
=
new
StdClass
;
$CFG
->
docroot
=
dirname
(
__FILE__
);
// figure out our include path
$CFG
->
libroot
=
dirname
(
dirname
(
__FILE__
))
.
'/lib/'
;
if
(
array_key_exists
(
'MAHARA_LIBDIR'
,
$_SERVER
)
&&
!
empty
(
$_SERVER
[
'MAHARA_LIBDIR'
]))
{
$CFG
->
libroot
=
$_SERVER
[
'MAHARA_LIBDIR'
];
}
set_include_path
(
'.'
.
PATH_SEPARATOR
.
$CFG
->
libroot
);
if
(
!
file_exists
(
$CFG
->
libroot
.
'config.php'
)
||
!
is_readable
(
$CFG
->
libroot
.
'config.php'
))
{
throw
new
Exception
(
"Not installed! Please create config.php from config-dist.php"
);
}
require
(
'config.php'
);
$CFG
=
(
object
)
array_merge
((
array
)
$cfg
,(
array
)
$CFG
);
?>
\ No newline at end of file
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