mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-24 08:53:05 +03:00
Add validation for the existence of "config.php" and "vendor/autoload.php" in the index.php file
This commit is contained in:
parent
942cb3d46f
commit
2e81c0ea53
1 changed files with 170 additions and 161 deletions
11
index.php
11
index.php
|
@ -47,6 +47,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if ( ! file_exists(__DIR__ . '/config.php'))
|
||||
{
|
||||
die('The root "config.php" file is missing, please copy "config-sample.php" to "config.php" and update it with your server data.');
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/config.php';
|
||||
|
||||
|
||||
|
@ -60,6 +65,11 @@
|
|||
*
|
||||
*/
|
||||
|
||||
if ( ! file_exists(__DIR__ . '/vendor/autoload.php'))
|
||||
{
|
||||
die('The "vendor/autoload.php" file is missing, please install the Composer dependencies with "composer install" before using the app.');
|
||||
}
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
/*
|
||||
|
@ -205,7 +215,6 @@ switch (ENVIRONMENT)
|
|||
// $assign_to_config['name_of_config_item'] = 'value of config item';
|
||||
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
|
||||
// --------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue