PHP unlink() Function

The unlink() function deletes a file.Returns TRUE on success or FALSE on failure.

bool unlink ( string $filename [, resource $context ] )

Deletes filename. Similar to the Unix C unlink() function. An E_WARNING level error will be generated on failure.

Example -

ParameterDescription
filenamePath to the file
contextSpecifies the context of the file handle. Context is a set of options that can modify the behavior of a stream