How Delete
Started on the old forum in February 2008 · view the original in the archive · old links redirect here
<?php unlink(p.jpg); ?>pls help
$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.