include is not a function for getting content in the way that are trying to use it. And when you call include inside a function, it is as if you simply added more to your PHP code within the function. What you want to do is read the file into a variable.
I have rewritten your AddTXT function to do this.
function AddTXT($filename)
{
if (empty($filename))
return;
if (!file_exists($filename))
return;
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
return $contents;
}