Rather than having to call / include a file you need on every single page, you can have them automatically prepended (top of file) or appended (bottom of file) automatically through your .htaccess file.
When I tried to run one of my php script, i threw this error.
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required ‘/opt/lampp/htdocs/reroute/index.php’ (include_path=’.:/opt/lampp/lib/php’) in Unknown on line 0
Happened due to read/write access permission. Because Linux system maintains permission level very strictly. Therefore you need to change permission of that file/files. You can do it either graphically (like lazy as me! :p), see attached image below. Or go to the location via terminal and give the files proper read/write access for Owner, Group, and Other.