I've got a function to auto-generate a comma separated file and offer user to save it as .scv file.
I am using following lines:
header("Content-type: text/csv");
header("Content-Disposition: attachment; filename=new.scv");
printf("\"Company\",%d\n",$this->getCompany_ID());
printf("\"Emplyoee\",%d\n",$this->getEmployee_ID());
but it does not seem to work. instead of offering me to save new.csv file it offers to save company.php file (this file calls the function)
Any help???