What are the potential pitfalls of using relative paths in PHP for including files?
Using relative paths in PHP for including files can lead to issues when the current working directory changes, causing the path to be incorrect. To avoid this problem, it's better to use absolute paths when including files in PHP.
// Using absolute path to include a file
include_once(__DIR__ . '/path/to/file.php');