Hi guyz, I have been figuring out what is wrong with my code why image doesn’t appear when I download it.
Heres is my code:
[php]<?php
require_once(‘include/middletier/waitlist_form.class.php’);
$tbleswaitlist = new waitlist_form();
$tbleswaitlist->display_upg($_REQUEST[‘studentNum’]);
$cpath="C:xampp/htdocs/OCWMS/modules/waitlist/uploads/".$tbleswaitlist->name;
header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Cache-Control: private",false);
header("Content-type: ".$tbleswaitlist->fileType);
header("Content-Disposition: attachment; filename=\"".basename($tbleswaitlist->name)."\"" );
header("Content-Length: ". $tbleswaitlist->fileSize);
ob_clean();
flush();
readfile($cpath);
exit();
?>[/php]
Hope you help me…thanx