Config.php Review
<?php // config.php return [ 'db' => [ 'host' => 'localhost', 'name' => 'app_db', 'user' => 'db_user', 'pass' => 'db_pass' ], 'app' => [ 'name' => 'My App', 'debug' => true ] ];
Using define() creates global constants that cannot be changed once set. config.php
: Ideally, store config.php in a folder above the public web root (e.g., in an includes/ folder) to prevent it from being accidentally accessed via a browser. [ 'host' =>
// Define path settings $root_dir = '/path/to/root/dir'; $uploads_dir = '/path/to/uploads/dir'; [ 'name' =>