REDROOM
PHP 8.2.32
Path:
Logout
Edit File
Size: 3.32 KB
Close
/home/ecopackply/www/demo/preload.php
Text
Base64
<?php /** * This file is part of CodeIgniter 4 framework. * * (c) CodeIgniter Foundation <admin@codeigniter.com> * * For the full copyright and license information, please view * the LICENSE file that was distributed with this source code. */ use CodeIgniter\Boot; use Config\Paths; /* *--------------------------------------------------------------- * Sample file for Preloading *--------------------------------------------------------------- * See https://www.php.net/manual/en/opcache.preloading.php * * How to Use: * 0. Copy this file to your project root folder. * 1. Set the $paths property of the preload class below. * 2. Set opcache.preload in php.ini. * php.ini: * opcache.preload=/path/to/preload.php */ // Load the paths config file require __DIR__ . '/app/Config/Paths.php'; // Path to the front controller define('FCPATH', __DIR__ . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR); class preload { /** * @var array Paths to preload. */ private array $paths = [ [ 'include' => __DIR__ . '/vendor/codeigniter4/framework/system', // Change this path if using manual installation 'exclude' => [ // Not needed if you don't use them. '/system/Database/OCI8/', '/system/Database/Postgre/', '/system/Database/SQLite3/', '/system/Database/SQLSRV/', // Not needed for web apps. '/system/Database/Seeder.php', '/system/Test/', '/system/CLI/', '/system/Commands/', '/system/Publisher/', '/system/ComposerScripts.php', // Not Class/Function files. '/system/Config/Routes.php', '/system/Language/', '/system/bootstrap.php', '/system/util_bootstrap.php', '/system/rewrite.php', '/Views/', // Errors occur. '/system/ThirdParty/', ], ], ]; public function __construct() { $this->loadAutoloader(); } private function loadAutoloader(): void { $paths = new Paths(); require rtrim($paths->systemDirectory, '\\/ ') . DIRECTORY_SEPARATOR . 'Boot.php'; Boot::preload($paths); } /** * Load PHP files. */ public function load(): void { foreach ($this->paths as $path) { $directory = new RecursiveDirectoryIterator($path['include']); $fullTree = new RecursiveIteratorIterator($directory); $phpFiles = new RegexIterator( $fullTree, '/.+((?<!Test)+\.php$)/i', RecursiveRegexIterator::GET_MATCH, ); foreach ($phpFiles as $key => $file) { foreach ($path['exclude'] as $exclude) { if (str_contains($file[0], $exclude)) { continue 2; } } require_once $file[0]; // Uncomment only for debugging (to inspect which files are included). // Never use this in production - preload scripts must not generate output. // echo 'Loaded: ' . $file[0] . "\n"; } } } } (new preload())->load();
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 6 × Files: 8
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
.idea
DIR
-
drwxr-xr-x
2026-01-24 07:52:54
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
app
DIR
-
drwxr-xr-x
2026-01-24 07:54:38
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
public
DIR
-
drwxr-xr-x
2026-01-27 08:03:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
system
DIR
-
drwxr-xr-x
2026-01-24 08:11:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tests
DIR
-
drwxr-xr-x
2026-01-24 08:18:16
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
writable
DIR
-
drwxr-xr-x
2026-01-24 08:19:29
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
.htaccess
384 B
lrw-r--r--
2026-01-27 08:03:55
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
composer.json
2.30 KB
lrw-r--r--
2026-01-24 07:52:40
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
env
2.33 KB
lrw-r--r--
2026-01-24 07:52:39
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
LICENSE
1.13 KB
lrw-r--r--
2026-01-24 07:52:41
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
phpunit.xml.dist
2.43 KB
lrw-r--r--
2026-01-24 07:52:42
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
preload.php
3.32 KB
lrw-r--r--
2026-01-24 07:52:43
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
README.md
2.67 KB
lrw-r--r--
2026-01-24 07:52:44
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
spark
2.61 KB
lrw-r--r--
2026-01-24 07:52:45
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).