By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,053 Members | 1,595 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,053 IT Pros & Developers. It's quick & easy.

Delete ftp-folder created via php installation?

P: n/a
Hi,

how do I delete a folder at my ftp-server, that was automatically
created through a installation script? I dont have the permission to
delete that folder :-(

Thx for your help

Alf

P.S.
I have already found the following script, but I dont know where exactly
do I need to execute it:

---------------------------------------------------
<?php
function delete($file) {
chmod($file,0777);
if (is_dir($file)) {
$handle = opendir($file);
while($filename = readdir($handle)) {
if ($filename != "." && $filename != "..") {
delete($file."/".$filename);
}
}
closedir($handle);
rmdir($file);
} else {
unlink($file);
}
}

delete("folderrname");
-------------------------------------------------

....whereas foldername at the end is the folder to be deleted.
?>
Jul 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Alf Laue wrote:
how do I delete a folder at my ftp-server, that was automatically
created through a installation script? I dont have the permission to
delete that folder :-(


When the site is hosted on a *nix server, the easiest way to remove the
folder is through exec():

exec('rm -r foldername');
JW

Jul 17 '05 #2

P: n/a
Janwillem Borleffs wrote:
Alf Laue wrote:
how do I delete a folder at my ftp-server, that was automatically
created through a installation script? I dont have the permission to
delete that folder :-(

When the site is hosted on a *nix server, the easiest way to remove the
folder is through exec():

exec('rm -r foldername');
JW

just because your ISP has set up an ftp directory doesn't mean you have
to use it - just let it sit there.
Jul 17 '05 #3

P: n/a
here is what i use
<?
$path = '/path/to/folder/;

$cmd = "rm -rf $path";

`$cmd`;

?>

"noSpam" <ga*****@nowhere.qwerty.no.spam.address.com> wrote in message
news:Px******************@fe1.news.blueyonder.co.u k...
Janwillem Borleffs wrote:
Alf Laue wrote:
how do I delete a folder at my ftp-server, that was automatically
created through a installation script? I dont have the permission to
delete that folder :-(

When the site is hosted on a *nix server, the easiest way to remove the
folder is through exec():

exec('rm -r foldername');
JW

just because your ISP has set up an ftp directory doesn't mean you have to
use it - just let it sit there.

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.