check file if exists

This commit is contained in:
Ibnu Maksum 2023-10-24 13:38:58 +07:00
parent 36b47a3e8d
commit a18c07ba42
No known key found for this signature in database
GPG key ID: 7FC82848810579E5
2 changed files with 25 additions and 0 deletions

View file

@ -35,6 +35,18 @@ if (php_sapi_name() !== 'cli') {
echo "<pre>";
}
if(!file_exists('../config.php')){
die("config.php file not found");
}
if(!file_exists('orm.php')){
die("orm.php file not found");
}
if(!file_exists('uploads/notifications.json')){
die("uploads/notifications.json file not found");
}
require_once '../config.php';
require_once 'orm.php';

View file

@ -35,6 +35,19 @@ if(php_sapi_name() !== 'cli'){
echo "<pre>";
}
if(!file_exists('../config.php')){
die("config.php file not found");
}
if(!file_exists('orm.php')){
die("orm.php file not found");
}
if(!file_exists('uploads/notifications.json')){
die("uploads/notifications.json file not found");
}
require_once '../config.php';
require_once 'orm.php';
require_once 'autoload/PEAR2/Autoload.php';