What are the potential consequences of not using absolute file paths in PHP includes?
Using relative paths in PHP includes can lead to issues when including files from different directories, as the path will be relative to the current working directory. This can result in errors when the script is executed from a different location or context. To avoid this, it's recommended to use absolute file paths in PHP includes to ensure that the files are included correctly regardless of the current working directory.
// Using absolute file paths in PHP includes
include_once(__DIR__ . '/path/to/file.php');