delete

(no version information, might be only in CVS)

delete -- 参见 unlink()unset()

说明

void delete ( string file )

这是个虚构的手册条目来给那些本来是找 unlink() 或者 unset() 的人提供一些有用的信息。

参见 unlink() 来删除文件,unset() 来删除变量。


add a note add a note User Contributed Notes
bmcouto at hotmail dot com
01-Oct-2006 04:30
$myFile = "testFile.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
fclose($fh);

Now to delete testFile.txt we simply run a PHP script that is located in the same directory. Unlink just needs to know the name of the file to start working its destructive magic.

$myFile = "testFile.txt";
unlink($myFile);

The testFile.txt should now be removed.