Skip to content

Instantly share code, notes, and snippets.

@Ginnw2
Created December 8, 2018 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Ginnw2/221abe3946f613a31665e3237bc60376 to your computer and use it in GitHub Desktop.
Save Ginnw2/221abe3946f613a31665e3237bc60376 to your computer and use it in GitHub Desktop.
$ids добавляется в свойства инфоблока.
if(isset($_FILES)) {
$ids = array();
foreach($_FILES as $key=>$file) {
$file_params = array(
'name'=>$file['name'],
'size'=>$file['size'],
'tmp_name'=>$file['tmp_name'],
"type" => "",
"old_file" => "",
"del" => "",
"MODULE_ID" => "iblock");
$id = CFile::SaveFile($file_params, "iblock");
if($id)
$ids[] = $id;
}
}
echo "<pre>"; print_r($ids); echo "<pre>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment