Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP unlink() Function

PHP unlink() Function


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual


Definition and Usage

The unlink() function deletes a file.

Returns TRUE on success, or FALSE on failure.

Syntax

unlink(filename,context)

Parameters Description
filename Required. Specifies the file to delete.
context Optional. Specifies the context of the file handle. A context is a set of options that can modify the behavior of a stream.

Example


PHP Filesystem Reference Manual Complete PHP Filesystem Reference Manual