Facebook Twitter Reset

This Tutorial Has Been Viewed 766 Times.

File System Reference In PHP

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”);
}
?>

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Incoming search terms:




You will also be interested in ,

One Response to “File System Reference In PHP”

  1. Kelly Blue
    May 23, 2011 at 4:50 pm #

    this is a very helpful tutorial.

    Thanks both of you

    Kelly Blue
    Web Developer, Australia

    VA:F [1.9.13_1145]
    Rating: 0.0/5 (0 votes cast)
    VA:F [1.9.13_1145]
    Rating: 0 (from 0 votes)

Leave a Comment

Spam protection by WP Captcha-Free

Affordable Seo PackagesSeo BlogEdu Backlinks
More in Css (10 of 16 articles)