How can PHP scripts handle file inclusions from the local filesystem independently of htaccess restrictions, and what are the potential pitfalls?

PHP scripts can handle file inclusions from the local filesystem independently of htaccess restrictions by using the PHP `file_get_contents()` function to read the contents of the file and then `eval()` function to execute it. However, this approach can be dangerous as it can lead to code injection vulnerabilities if the included file is not properly sanitized.

$file_path = '/path/to/file.php';
$file_contents = file_get_contents($file_path);
eval("?>" . $file_contents);