What best practices should be followed when using require_once() in PHP?

When using require_once() in PHP, it is important to follow best practices to ensure that files are included only once to avoid conflicts and errors in your code. To do this, always use the full path to the file you want to include to prevent any ambiguity or issues with file paths. Additionally, make sure to use require_once() instead of require() to ensure that the file is included only once throughout the execution of the script.

<?php
require_once(__DIR__ . '/path/to/file.php');
// Your code here
?>