Define and use the unlink () function to delete objects. If the call succeeds, true is returned. if the call fails, false is returned. Syntax {code...} parameter description filename is required. Specifies the file to be deleted. Context is optional. Specifies the file handle environment. Context is a definition and usage of stream behavior that can be modified...
The unlink () function deletes a file.
If the call succeeds, true is returned. if the call fails, false is returned.
Syntax
unlink(filename,context)
| Parameters |
Description |
| Filename |
Required. Specifies the file to be deleted. |
| Context |
Optional. Specifies the file handle environment. Context is a set of options for modifying stream behavior. |
Tips and comments
Note:ContextPHP 5.0.0 is supported.
Example
Definition and usage
The unlink () function deletes a file.
If the call succeeds, true is returned. if the call fails, false is returned.
Syntax
unlink(filename,context)
| Parameters |
Description |
| Filename |
Required. Specifies the file to be deleted. |
| Context |
Optional. Specifies the file handle environment. Context is a set of options for modifying stream behavior. |
Tips and comments
Note:ContextPHP 5.0.0 is supported.
Example
For more articles about PHP unlink () functions, refer to PHP Chinese network!