Last active
November 20, 2021 18:54
-
-
Save s2ar/85a0dd4f648a48c5faaf to your computer and use it in GitHub Desktop.
Bitrix. Очистить свойство типа Файл.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$bx_photo = CIBlockElement::GetProperty( | |
$IBID, | |
$id, | |
'sort', | |
'asc', | |
array('CODE' => 'PHOTO') | |
); | |
$ar_photo = $bx_photo->Fetch(); | |
CIBlockElement::SetPropertyValueCode($_POST['id'], 'PHOTO', array( | |
$ar_photo['PROPERTY_VALUE_ID'] => array('del' => 'Y', 'tmp_name' => '') | |
)); | |
CFile::Delete($ar_photo['VALUE']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment