Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
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
25 $phpbb_root_path = __DIR__ . '/../';
26 $phpEx = substr(strrchr(__FILE__, '.'), 1);
27 require($phpbb_root_path . 'includes/startup.' . $phpEx);
28 require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
29
30 $phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
31 $phpbb_class_loader->register();
32
33 $phpbb_config_php_file = new \phpbb\config_php_file($phpbb_root_path, $phpEx);
34 extract($phpbb_config_php_file->get_all());
35
36 if (!defined('PHPBB_ENVIRONMENT'))
37 {
38 @define('PHPBB_ENVIRONMENT', 'production');
39 }
40
41 require($phpbb_root_path . 'includes/constants.' . $phpEx);
42 require($phpbb_root_path . 'includes/functions.' . $phpEx);
43 require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
44 require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
45 require($phpbb_root_path . 'includes/functions_compatibility.' . $phpEx);
46
47 $phpbb_container_builder = new \phpbb\di\container_builder($phpbb_root_path, $phpEx);
48 $phpbb_container = $phpbb_container_builder->with_config($phpbb_config_php_file);
49
50 $input = new ArgvInput();
51
52 if ($input->hasParameterOption(array('--env')))
53 {
54 $phpbb_container_builder->with_environment($input->getParameterOption('--env'));
55 }
56
57 if ($input->hasParameterOption(array('--safe-mode')))
58 {
59 $phpbb_container_builder->without_extensions();
60 $phpbb_container_builder->without_cache();
61 }
62 else
63 {
64 $phpbb_class_loader_ext = new \phpbb\class_loader('\\', "{$phpbb_root_path}ext/", $phpEx);
65 $phpbb_class_loader_ext->register();
66 }
67
68 $phpbb_container = $phpbb_container_builder->get_container();
69 $phpbb_container->get('request')->enable_super_globals();
70 require($phpbb_root_path . 'includes/compatibility_globals.' . $phpEx);
71
72 register_compatibility_globals();
73
74 /** @var \phpbb\language\language $language */
75 $language = $phpbb_container->get('language');
76 $language->add_lang(array('common', 'acp/common', 'cli'));
77
78 /* @var $user \phpbb\user */
79 $user = $phpbb_container->get('user');
80 $user->data['user_id'] = ANONYMOUS;
81 $user->ip = '127.0.0.1';
82
83 $application = new \phpbb\console\application('phpBB Console', PHPBB_VERSION, $language);
84 $application->setDispatcher($phpbb_container->get('dispatcher'));
85 $application->register_container_commands($phpbb_container->get('console.command_collection'));
86 $application->run($input);
87