All Dictionaries
PHP Related dictionaries
php unlink() function
Detailed instructions for use
php unlink() function
Chinese translation
Recent Updates: 2018-04-19 14:27:46
UK[ˌʌn'lɪŋk] US[ˌʌn'lɪŋk]
vt.Unlock the link of...
Third person singular: unlinks Present participle: unlinking Past tense: unlinked Past participle: unlinked
php unlink() function syntax
Function:Delete files.
Syntax: unlink(filename,context)
Parameters:
| Parameters | Description |
| filename | Required. Specifies the files to be deleted. |
| context | Optional. Specifies the environment for a file handle. Context is a set of options that modify the behavior of the stream. |
Description: If successful, it will return true, if it fails, it will return false.
php unlink() function example
<?php
$file = "./test.txt";
if (!unlink($file))
{
echo ($file."删除失败");
}
else
{
echo ($file."删除成功");
}
?>Run instance »
Click the "Run instance" button to view the online instance




