General Introduction
Features
Settings
Email system
Date and Time
URL rewrite
Special constants
Special variables
Complex logic in filter
CheckFile
CheckImageFile
CopyFile
Delete
FormatSize
GetByID
GetFileArray
GetList
GetPath
InputFile
IsImage
MakeFileArray
ResizeImage
ResizeImageFile
ResizeImageGet
SaveFile
SaveForDB
Show2Images
ShowImage
UpdateDesc
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
Up