Those headers are no good. There is no such thing as / as an interpretable HTTP header. Perhaps you mean to use a Location: directive? Headers already being sent is caused by previous output, which does include error messages. You cannot specify anything requiring headers anytime after output (sessions, cookies, header, etc), unless the output is buffered.
You cannot do this to detect a link failure on the included script. That is an E_ERROR which is fatal for a reason, and PHP cannot continue with parsing. Because of this, there is no way to capture it at runtime. I don't even think the APD would let you evaluate and capture these, but you can execute a system call to the lint using an exec call to php.exe -l; if it returns 0, then it was syntactically accurate.
This is a complete waste IMO. Syntactical errors should be caught during development, long before they hit a production server.
If you insist on a check against an include instead of a forced require, I'd suggest keeping it with a defined constant. Since you are not using _once functionality, you should be doing it anyways to prevent attempts to recreate definitions to classes and functions which are fatal when attempting to do so.
PHP Code:
// include.php
<?php
if (!defined('INCLUDE_H'))
{
define('INCLUDE_H', true);
// definitions
}
// index
include 'include.php';
if (!defined('INCLUDE_H'))
{
die('Failed to include.');
}
Oldschool.