The unlink() function deletes a file.
This function returns TRUE on success, or FALSE on failure.
Syntax
| unlink(filename,context) |
| Parameter | Description |
|---|---|
| filename | Required. Specifies the file to delete |
Example
<?php
$file = “newfile.txt”;
if (!unlink($file))
{
echo (“Error deleting $file”);
}
else
{
echo (“Deleted $file”);
}
?>
Definition and Usage
The rmdir() function removes an empty directory.
This function returns TRUE on success, or FALSE on failure.
Syntax
| rmdir(dir,context) |
| Parameter | Description |
|---|---|
| dir | Required. Specifies the directory to be removed |
Example
<?php
$path = “include”;
if(!rmdir($path))
{
echo (“Could not remove $path”);
}
?>
Incoming search terms:
- internally which tool does the dns_get_record uses (1)
- inurl:image php?id=12 (1)
- php includes system tips (1)
- PHP system reference (1)
You will also be interested in ,
- Copy mysql column in varchar to type date
- Get IP address using gethostbyname() function
- Locking a text file database using php
- Simple Visitor Counter Using php
- To Remove An Empty Element From An Array Using PHP
- Simple auto suggest script using ajax php css and tags from wordpress
- Simple file upload script using php
- Read text file reverse using php
- Image gallery using php and mysql blob storage and displaying the image from mysql blob
- Send Email to Multiple Persons using php


this is a very helpful tutorial.
Thanks both of you
Kelly Blue
Web Developer, Australia