What are the potential issues with using different paths for require_once statements in PHP scripts?
Using different paths for require_once statements can lead to confusion and errors in your PHP scripts. To avoid this issue, it's recommended to use absolute paths or define a constant for the base directory of your project and use it in all require_once statements.
// Define base directory constant
define('BASE_DIR', __DIR__);
// Example of using the constant in require_once statements
require_once BASE_DIR . '/includes/config.php';
require_once BASE_DIR . '/includes/functions.php';