how to remove directory delete directories wiht PHP code
RegisterLogin
how to remove directory delete directories wiht PHP code
Post Description: how to remove directory delete directories wiht PHP code
Tags: how, to, remove, directory, delete, directories, wiht, PHP, code
This Post Was Posted On Feb 29, 2008 By web hosting #1325
Post Description: how to remove directory delete directories wiht PHP code
Tags: how, to, remove, directory, delete, directories, wiht, PHP, code
This Post Was Posted On Feb 29, 2008 By web hosting #1325
how to remove directory delete directories wiht PHP code by web hosting
rmdir()
Removes directory
example, lets say i want to remove or delete a directory called images, this is how i would do it with php
$mydir = '/path/directory/images/';
rmdir($mydir);
thats it
but this would be a more practical use, first i want to check if the directory even exists:
$mydir = '/path/directory/images/';
if (is_dir($mydir)) {
rmdir($mydir);
} else {
echo $mydir.' does not exists';
}
if (is_dir($mydir)) {
rmdir($mydir);
} else {
echo $mydir.' does not exists';
}
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Sat Dec 24, 2011 4:05 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3