ProgrammingTalk


Welcome to the ProgrammingTalk forums. We are a programming, coding, and design oriented community dedicated to helping out with all different types of programming questions and languages.

You are currently viewing our board as a guest which gives you very limited access to view discussions and access our other features. In order to gain full access to this board, we require you to register. Registration is absolutely free and very easy to accomplish, simply click the link above to begin. If you have already registered with us, all you have to do is login.

If you have any problems with the registration process or your account login, please don't hesitate to contact Support.
Go Back   ProgrammingTalk > Programming Languages > PHP
Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-02-05, 02:38 PM
Nico's Avatar
Nico Nico is online now
Community Liaison
 
Join Date: Sep 2005
Location: Spain
Posts: 6,197
Delete Folder with PHP?

Hi,
I'm writing on a PHP script which requires an installation. I've got all the installation files in the same folder, and I want to remove this folder after installing with a click on a link or button or something like that. Is that possible? I've been searching on Google a long time... without luck! I hope someone can help. Thanks in advance,

Nico

EDIT:

Since this topic gets a lot of views still, I'll post an example here:
PHP Code:
// Path to directory you want to delete
$directory 'dir';

// Delete it
if (rmdir($directory))
{
    echo 
"{$directory} has been deleted";
}
else
{
    echo 
"{$directory} could not be deleted";


Last edited by Nico : 12-13-07 at 12:13 PM.
Reply With Quote
  #2  
Old 09-02-05, 02:47 PM
Keith's Avatar
Keith Keith is offline
Community VIP
 
Join Date: Feb 2004
Posts: 1,107
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
delete duplicate rows in mysql using php seans9 PHP 4 07-16-08 10:42 PM
PHP Downside--Solutions? Amulet PHP 10 07-15-05 09:26 AM
PHP multi-dimensional array sorting issue aqw PHP 2 06-25-05 12:09 AM
PHP / Graphic Developers someotherguy582 Job Offers & Assistance 1 06-05-05 08:40 PM
Delete an image with php mdhall PHP 3 04-22-04 04:24 PM

Advertisement:

All times are GMT -5. The time now is 04:31 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright © 1998-2008 ProgrammingTalk. All Rights Reserved. A division of iNET Interactive
Related iNET Interactive Sites:
Web Hosting Talk | Hot Scripts | OC Forums | Mac-Forums