This repository was archived by the owner on Mar 8, 2021. It is now read-only.
Repository navigation
About autoload.php
Deesen edited this page Jan 28, 2017
·
6 revisions
The file autoload.php.blank can be safely deleted.
To activate, rename file autoload.php.blank to autoload.php. It is executed here:
https://github.com/modxcms/evolution/blob/v1.2/autoload.php.blank
https://github.com/modxcms/evolution/blob/v1.2/index.php#L50
If setting via .htaccess is not possible, autoload.php can be used to change PHP-settings at run-time.
<?php
setlocale (LC_ALL, 'en_EN');
ini_set('display_errors', '1');
For example if a site became compromised / hacked or for whatever reason, autoload.php can be easily used to log suspicious server-requests.
<?php
file_put_contents('your_secret_directory/log_server.txt', print_r($_SERVER,true), FILE_APPEND);
file_put_contents('your_secret_directory/log_request.txt',print_r($_REQUEST,true), FILE_APPEND);
exit;