I want to write data in a form to a csv file. I have used the following code:
$data = array();
$data['name'] = $this->getRequest()->getParam('name');
$data['company'] = $this->getRequest()->getParam('company');
$data['email'] = $this->getRequest()->getParam('email');
$data_row[] = $data;
$fileName = "example.csv";
$var_csv = new Varien_File_Csv();
$var_csv->saveData($fileName, $data_row);
But it is not working. Where will be the location of the csv file. Please help.
$fileName
?$filename
it will be saved there