Hi,
I'm facing a problem in exporting file into client machine. My current issue is, when my client click on "Export" button, the particular file will saved in SERVER instead of his computer. Refer below for my partial script.
$target_folder = "C:/AuditReport/";
if (isset($_POST['btnExport']))
{
if (file_exists($target_folder)) {
} else {
mkdir("C:/AuditReport/",0700);
}
$sql = "select to_char(sysdate,'yyyymmdd-HH24MISS') from dual";
$s = oci_parse($c, $sql);
oci_execute($s);
OCIFetchInto($s, $row2);
$file_date = $row2[0];
$filename = $file_date.' StudAuditReport.txt';
$handle = fopen("C:/AuditReport/".$filename, 'x+');
fwrite($handle, $detail);
fclose($handle);
Any advice ?
Sheena