phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP File: Working Easy with File (Delete File)

Tag: file, delete   Category: PHP Classes
post: 04 Jan 2008 read: 1,165


PHP File Tutorial: Now, we try to delete a file use class.file.php. Like before, delete a file using this class is very easy. You just call method delete(). Try this practice.

Create a file named "delete.php" within www/test/file. Enter following codes:


 <?
 include "class.file.php";
 
 $f = "new.file.txt";
 
 $file = new file($f);
 
 if( $file->delete() ){
 	echo "sucess";
 }else{
 	echo "fail";
 }
 ?>


Series this article:
PHP File: Working Easy with File (Read File)
PHP File: Working Easy with File (Create and Write)
PHP File: Working Easy with File (Delete File)
PHP File: Working Easy with File (Download)

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting