Skip to content

Instantly share code, notes, and snippets.

@nimdasx
Last active January 14, 2020 09:53
Show Gist options
  • Save nimdasx/de6422cd0d5c3d08bebaf244f07a3d78 to your computer and use it in GitHub Desktop.
Save nimdasx/de6422cd0d5c3d08bebaf244f07a3d78 to your computer and use it in GitHub Desktop.
cara upload file di phalcon
<?php
$files = $this->request->getUploadedFiles("FILE_INOVASI");
if ($this->request->hasFiles()) {
foreach ($files as $file)
{
$new_file_final = $r->TAHUN.'-'.$r->SKPD_ID.'-'.$r->KEGIATAN_ID.'-'.$file->getName();
$file->moveTo(
'dokumen-inovasi/'.$new_file_final
);
$r->FILE_INOVASI = 'dokumen-inovasi/'.$new_file_final;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment