What is the issue with using indirect include() in PHP?

The issue with using indirect include() in PHP is that it can be a security risk as it allows for remote file inclusion attacks. To solve this issue, it is recommended to use absolute paths instead of relative paths when including files.

<?php
include_once(__DIR__ . '/path/to/file.php');
?>