Php Remove File

[Solved] Php Remove File | Php - Code Explorer | yomemimo.com
Question : php remove file

Answered by : -1vajs8k9qntw

if(file_exists($file)) {	unlink($file);
} 

Source : https://stackoverflow.com/questions/2371408/how-to-delete-a-file-via-php | Last Update : Mon, 20 Jan 20

Question : delete file in php

Answered by : ankur-prajapati

unlink(filepath);

Source : | Last Update : Sat, 30 Jan 21

Question : php unlink

Answered by : bored-beaver-ei7bz9exyli9

<?php unlink('test.html');
?>

Source : | Last Update : Thu, 16 Apr 20

Question : php delete file

Answered by : revaz-gh

// delete file function, if silent is false, function will throw exception
function deleteFile($fullFileName, $silent=0) { if (file_exists($fullFileName)) { unlink($fullFileName); return TRUE; } else { if ($silent == 1) { return FALSE; } else { throw new \InvalidArgumentException('File "'.$fullFileName.'" not exists.'); } }
}

Source : | Last Update : Mon, 27 Sep 21

Answers related to php remove file

Code Explorer Popular Question For Php