I would like to retrieve information from a csv file on drive in php here is the piece of code in question which does not seem to work.
Code: Select all
foreach ($imports->setColumns($imports->getTable() . '.*')->getBy(array('id !=' => ''))->convertRecords() as $imp){
$imp->getById($imp->id);
if ( ! $imp->isEmpty() and ! empty($imp->template)){
$options = array_merge($imp->options, $imp->template);
$this->__ver_4_transition_fix($options);
$imp->set(array(
'options' => $options
))->update();
if ($imp->type == 'file'){
$imp->set(array(
'path' => $uploads['basedir'] . DIRECTORY_SEPARATOR . self::FILES_DIRECTORY . DIRECTORY_SEPARATOR . basename($imp->path)
))->update();
}
}
Thank you in advance for your answers.