Aşağıda, mantığı basit biçimde anlattım hocam.

index.php
<?php
$m = 1;
include 'ddos.php';
?>
Test içerik
ddos.php
<?php
if($m == 1){
    die("error");
    exit();
}
?>