Forum Moderators: coopster
$contents = file_get_contents($_FILES["file"]["tmp_name"]);
$open = fopen($_FILES["file"]["tmp_name"],"a+");
$write = fwrite($open,include("inc/up/att.php").include("inc/up/header.php").$contents.include("inc/right.php").include("inc/footer.php"));
move_uploaded_file($_FILES["file"]["tmp_name"],
$category.'/' . $filename); any ideas how to get the other includes to work?
i just realized maybe i could use file_put_contents as well but that is not working either.
ob_start();
include ("inc/up/att.php");
$att = ob_get_contents();
ob_end_clean();
ob_start();
include ("inc/up/header.php");
$header = ob_get_contents();
ob_end_clean();
ob_start();
include ("inc/right.php");
$right = ob_get_contents();
ob_end_clean();
ob_start();
include ("inc/footer.php");
$footer = ob_get_contents();
ob_end_clean();
$contents = file_get_contents($_FILES["file"]["tmp_name"]);
$open = fopen($_FILES["file"]["tmp_name"],"a+");
$assembled=$att.$header.$contents.$right.$footer;
$write = fwrite($open,$assembled);
move_uploaded_file($_FILES["file"]["tmp_name"],
$category.'/' . $filename);
/* Also, I'm not seeing anything to execute $write, so you might need to switch the line to: fwrite($open,$assembled); (remove the variable storage) */