Menu

[r11200]: / trunk / index.php  Maximize  Restore  History

Download this file

69 lines (64 with data), 3.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* Copyright © 1999-2010 $ThePhpWikiProgrammingTeam
* = array(
* "Steve Wainstead", "Clifford A. Adams", "Lawrence Akka",
* "Scott R. Anderson", "Jon Åslund", "Neil Brown", "Jeff Dairiki",
* "Stéphane Gourichon", "Jan Hidders", "Arno Hollosi", "John Jorgensen",
* "Antti Kaihola", "Jeremie Kass", "Carsten Klapp", "Marco Milanesi",
* "Grant Morgan", "Jan Nieuwenhuizen", "Aredridel Niothke",
* "Pablo Roca Rozas", "Sandino Araico Sánchez", "Joel Uckelman",
* "Reini Urban", "Marc-Etienne Vargenau", "Joby Walker", "Tim Voght",
* "Jochen Kalmbach");
*
* This file is part of PhpWiki.
*
* PhpWiki 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.
*
* PhpWiki 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 PhpWiki; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* SPDX-License-Identifier: GPL-2.0-or-later
*
*/
if (version_compare(PHP_VERSION, '5.3.3', '<')) {
exit("Your PHP version is too old. You must have at least PHP 5.3.3.");
}
if (!function_exists('_')) {
die("The PHP extension 'gettext' is required for PhpWiki. Add: extension=gettext to php.ini");
//include("upgradephp-19/ext/gettext.php");//experimental for older php versions or where php extensions are not compiled in
}
if (!function_exists('mb_regex_encoding')) {
die("The PHP extension 'mbstring' is required for PhpWiki. Add: extension=mbstring to php.ini");
}
require_once(dirname(__FILE__) . '/lib/prepend.php');
require_once(dirname(__FILE__) . '/lib/IniConfig.php');
IniConfig(dirname(__FILE__) . "/config/config.ini");
////////////////////////////////////////////////////////////////
// PrettyWiki
// Check if we were included by some other wiki version
// (getimg.php, en, de, wiki, ...) or not.
// If the server requested this index.php fire up the code by loading lib/main.php.
// Parallel wiki scripts can now simply include /index.php for the
// main configuration, extend or redefine some settings and
// load lib/main.php by themselves. See the file 'wiki'.
// This overcomes the IndexAsConfigProblem.
// Generally a simple
// define('VIRTUAL_PATH', $_SERVER['SCRIPT_NAME']);
// is enough in the wiki file, plus the action definition in a .htaccess file
////////////////////////////////////////////////////////////////
// If every page is just empty, comment the if (@is_dir line out,
// to force include "lib/main.php".
// Without the dir check it might fail for index.php via DirectoryIndex
if (@is_dir(SCRIPT_FILENAME) or realpath(SCRIPT_FILENAME) == realpath(__FILE__)) {
include(dirname(__FILE__) . "/lib/main.php");
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.