I am very new to open-cart.I have a task to read data from the file.
So i have made a function open-cart to read the file in model category.php
Code :
public function getFileData($category_id) {
$file = fopen("temp.txt","r");
$a = array();
while(! feof($file))
{
array_push($a, fgetcsv($file));
}
fclose($file);
return $a;
}
now when i call it from controller it gives me timeout error more than 60s. i increased the time out using set_time_limit but no effect.
But then i made a simple script to read file and it is reading it with in a milliseconds. But same code is not working in opencart.
I tried Google but found nothing . i am sure that i am missing something.Any help will be appreciated