
July 13th, 2004
11:18 PM
Neverside Newbie
Status: Offline!
My script.
<?php
// Create the dir
mkdir("../downloads/scripts/".$_POST['sdir'], 0777);
// Move the script to the dir
move_uploaded_file($_FILES['thescript']['tmp_name'], "../downloads/scripts/".$_POST['sdir']."/".$_FILES['thescript']["name"]);
for($q2=1; $q2 <= $preview_form_limit; $q2++){
// Move the previews
move_uploaded_file($_FILES['preview'.$q2]['tmp_name'], "../downloads/scripts/".$_POST['sdir']."/".$_FILES['preview'.$q2]["name"]);
}
?>
<?php
// Remove the dir
if(delete_dir("../downloads/scripts/".$script['dir']."/")){
rmdir("../downloads/scripts/".$script['dir']."/"); //Here is my error
}
?>
in this case $script['dir'] is alxx
*delete_dir() is a function that removes all the files in the dir
___________________
| Lunar Poll | Dexxaboys Site |

July 14th, 2004
12:09 AM
Neverside Newbie
Status: Offline!
Originally posted by Dexxaboy
Opps, i select wrong dir. :-x
"Scripts is the main dir, and alxx is the subdir"
The dir is empty.
Like the other image, i cant uncheck writeprotect.
You're not an administrator on the machine then
Originally posted by Nem
Do this.
<?php
chmod("dirname", 0666);
?>
Run that before any of your script.
You can't chmod on Windows.

July 14th, 2004
12:23 AM
Neversidian
Status: Offline!
You can akdov, it just doesn't do anything 
___________________
angelessme, antagonising neverside members, staff and administration since 2001.

July 14th, 2004
12:57 AM
Neverside Newbie
Status: Offline!
Originally posted by akdovYou're not an administrator on the machine then.
Yes, i im the administrator.
___________________
| Lunar Poll | Dexxaboys Site |

July 14th, 2004
05:32 AM
Neverside Newbie
Status: Offline!
No one knows my problem?
___________________
| Lunar Poll | Dexxaboys Site |

July 14th, 2004
09:06 AM
Neverside Newbie
Status: Offline!
is the directory inside the apache main dir?

July 14th, 2004
12:10 PM
Pawn Coder
Status: Offline!
If you get the FTP program "Filezilla" it will go through and empty everything for you. It's pretty handy, and free
.
___________________
- Moderator at the official AMX Mod X forums

July 15th, 2004
12:55 AM
Neverside Newbie
Status: Offline!
Originally posted by chemical
is the directory inside the apache main dir?
I've changed the DocumentRoot inside httpd.conf
___________________
| Lunar Poll | Dexxaboys Site |

July 15th, 2004
01:32 AM
Neverside Newbie
Status: Offline!
I don't know what's wrong, because the only reasons the directory can't be removed is
A. There are files in it. If it looks like there are no files, check for hidden files.
B. If it is in fact empty, it's read-only. You need to be an administrator to remove read-only rights, or get an administrator to add you to full control for the parent folder.

July 15th, 2004
01:45 AM
Neverside Newbie
Status: Offline!
Originally posted by akdov
If it is in fact empty, it's read-only. You need to be an administrator to remove read-only rights, or get an administrator to add you to full control for the parent folder.
I am the administrator, but i do i change the read-only?
___________________
| Lunar Poll | Dexxaboys Site |