Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
phpbbcli.php
01 #!/usr/bin/env php
02 <?php
03 /**
04 *
05 * This file is part of the phpBB Forum Software package.
06 *
07 * @copyright (c) phpBB Limited <https://www.phpbb.com>
08 * @license GNU General Public License, version 2 (GPL-2.0)
09 *
10 * For full copyright and license information, please see
11 * the docs/CREDITS.txt file.
12 *
13 */
14
15 use Symfony\Component\Console\Input\ArgvInput;
16
17 if (php_sapi_name() != 'cli')
18 {
19 echo 'This program must be run from the command line.' . PHP_EOL;
20 exit(1);
21 }
22
23 define('IN_PHPBB', true);
24 $phpbb_root_path = __DIR__ . '/../';
25 $phpEx = substr(strrchr(__FILE__, '.'), 1);
26 require($phpbb_root_path . 'includes/startup.' . $phpEx);
27 require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
28
29 $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
30 $phpbb_class_loader->register();
31
32 $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
33 extract($phpbb_config_php_file->get_all());
34
35 require($phpbb_root_path . 'includes/constants.' . $phpEx);
36 require($phpbb_root_path . 'includes/functions.' . $phpEx);
37 require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
38 require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
39
40 $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_config_php_file, $phpbb_root_path, $phpEx);
41 $phpbb_container_builder->set_dump_container(false);
42
43 $input = new ArgvInput();
44
45 if ($input->hasParameterOption(array('--safe-mode')))
46 {
47 $phpbb_container_builder->set_use_extensions(false);
48 $phpbb_container_builder->set_dump_container(false);
49 }
50 else
51 {
52 $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
53 $phpbb_class_loader_ext->register();
54 phpbb_load_extensions_autoloaders($phpbb_root_path);
55 }
56
57 $phpbb_container = $phpbb_container_builder->get_container();
58 $phpbb_container->get('request')->enable_super_globals();
59 require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
60
61 $user = $phpbb_container->get('user');
62 $user->add_lang('acp/common');
63 $user->add_lang('cli');
64
65 $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $user);
66 $application->register_container_commands($phpbb_container->get('console.command_collection'));
67 $application->run($input);
68