Hello,
I can't seem to make the header function work properly if I include a file using include_once or require_once...Why is that? What could I do to make it work?
Here is my portion of code:
require_once ('book_sc_fns.php');
session_start();
header("Cache-control: private");
$filename = "DOC_Temp/".$GET['Abstract_Document'];
$TF = $GET['Abstract_Document'];
$Document_ID = $_SESSION['abstract_array']['Doc_ID'];
$Abstract_Text = get_abstract_document($Document_ID);
if (is_array($Abstract_Text))
{
$Content = $Abstract_Text["Abstract_Text"];
$fp = fopen($filename, 'w') or exit('fopen failed for ' . $filename);
$string = "<?php require_once('../clsMsDocGenerator.php'); \$doc = new clsMsDocGenerator(); \$doc->addParagraph('$Content'); \$doc->output(); @unlink('$TF');?>";
$write = fputs($fp, $string);
fclose($fp);
header("location:$filename");
exit();
}