Delete
CFile::Delete( int id )
The method removes a file from the file registrar table (b_file) and deletes it from the disk. Static method.
Parameters
Parameter | Description |
---|---|
id | Numerical file ID. |
See Also/h4>
Examples of use
<?
// delete the form image
$arFilter = array("ID" => 1, "ID_EXACT_MATCH" => "Y");
$rsForm = CForm::GetList($by, $order, $arFilter, $is_filtered);
if ($arForm = $rsForm->Fetch())
{
if (intval($arForm["IMAGE_ID"])>0) CFile::Delete($arForm["IMAGE_ID"]);
}
?>
© «Bitrix24», 2001-2024