Flux rss

Warning: rmdir(..): Directory not empty

Published by netty5, last update on Thursday October 30, 2008 07:01:21 AM by netty5

Warning: rmdir(..): Directory not empty






If you are attempting to delete a PHP file and that you get the error message “Warning: rmdir(..): Directory not empty”. This might mean that the directory is not empty. To be able to erase those files that are in the directory, there is a special PHP code that you can use in both the subfolders and the folders.
<?

rmdir_recursive function ($ dir)
(
/ / List the contents of the directory table
$ Dir_content = scandir ($ dir);
/ / Is it a directory?
If ($ dir_content! == FALSE) {
/ / For each directory entry
Foreach ($ dir_content as $ entry)
(
/ / Unix symbolic shortcuts, we go
If (! In_array ($ entry, array ('.','..'))){
/ / We find the path from the beginning
$ Entry = $ dir. '/'. $ entry;
/ / This entry is not an issue: it clears
If (! Is_dir ($ entry)) (
Unlink ($ entry);
)
/ / This entry is a folder, it again on this issue
Else (
Rmdir_recursive ($ entry);
}
}
}
}
/ / It has erased all entries in the folder, we can now erase
Rmdir ($ dir);
}
?>
Linux - Commands Command Description DOS equivalent ls lists the content of a directory dir cd change of directory cd cd .. parent directory cd.. mkdir creates a new directory md rmdir eliminates a directory deltree cp copy of a file copy, xcopy mv moves a file move... en.kioskea.net/linux/lincomm.php3
Download Remove Empty Directories Remove Empty Directories or RED is a free software intended to abolish the empty files. RED searches and abolishes the empty files by showing by a tree-like aspect the way of access to the file. You can create certain rules to be able to keep a... en.kioskea.net/telecharger/telecharger-335-remove-empty-directories
Background message "Warning! Spyware detected I let my roomie use my comp while i was away for a few weeks. I returned to find "Warning! Spyware detected on your computer! Install antivirus or spyware remover to clean your computer" as my background message. I tried to place a new background on... en.kioskea.net/forum/affich-14964-background-message-warning-spyware-detected
Computer Manufacturers DirectoryComputer Manufacturers Directory 3com Abit Acer Alcatel AMD Apple AS Rock Asus Atheros Canon Cisco Com One Compaq Connectland Conexant Creative Labs DELL D-Link Elitegroup Epson Foxconn Fujitsu Siemens en.kioskea.net/faq/sujet-367-computer-manufacturers-directory
Cleaning .thumbnails directoryCleaning .thumbnails directory Most desktop applications used under linux are able to display thumbnails of images stored on your PC. To quicken the display of these images, Linux tend to store them. The problem with these thumbnails... en.kioskea.net/faq/sujet-720-cleaning-thumbnails-directory
Hiding a file or directory under LinuxHiding a file or directory under Linux To hide a file or directory in Linux, just have its name be preceded by a period (.). For example: . bash_history . bash_profile . ssh Note that by doing so you are not really hiding the... en.kioskea.net/faq/sujet-812-hiding-a-file-or-directory-under-linux
Windows security warning downloading spywareHello, I am new here. I would like to stop windows security warning in popping up always and telling i need to download anti-spyware because everytime i cick it, eset nod32 will have a warning that i am downloaidng a trojan file. it repeats again and... en.kioskea.net/forum/affich-20833-windows-security-warning-downloading-spyware
Creating a Batch File to copy a directoryHello, I have a directory / folder on my desktop and sub-directories / sub-folders in it and various files in various directories. at the end of the day i want to copy those folders and files accordingly to flash drive lets say f:\ (f drive). I would... en.kioskea.net/forum/affich-30405-creating-a-batch-file-to-copy-a-directory
Download Crypto Chat 4 SkypeThe instantaneous customer of freight forwarding Skype is more and more popularized and used by numerous users across the world. Although contacts which are in your directory are all of knowledge, sometimes you want to have a private... en.kioskea.net/telecharger/telecharger-558-crypto-chat-4-skype
Download Total CopyThe transfer of documents, file or others from directory to other one is very common when they work on computer. Disadvantage with the administrator of file by default installed under Windows, it is that they cannot make a pause or cross a copy in... en.kioskea.net/telecharger/telecharger-254-total-copy
Download HTTrack Website CopierHTTrack is an offline browser. He allows you to download Websites from Internet towards your local directory. It rebuilds all directories, links HTML, pictures and other files constituting the site completely, all this from the server towards your... en.kioskea.net/telecharger/telecharger-557-httrack-website-copier
Ebadi rights group warns Iran on Internet crime billIranian Nobel peace laureate and women rights activist Shirin Ebadi speaks during a press conference in Tehran. Ebadi has condemned a draft bill on Internet crime, warning that it could boost the number of executions in the Islamic republic. The... en.kioskea.net/actualites/ebadi-rights-group-warns-iran-on-internet-crime-bill-10554-actualite.php3
EU warns teenagers of mobile phone ring-tone rip-offsMeglena Kuneva, European Commissioner for consumer protection speaks at a news conference at the EU headquarters in Brussels. The European Commission warned children and teenagers on Thursday to beware of mobile telephone ring-tone scams after... en.kioskea.net/actualites/eu-warns-teenagers-of-mobile-phone-ring-tone-rip-offs-10550-actualite.php3
US warns China of 'technological isolation'US Under Secretary of Commerce for International Trade Christopher Padilla (C), seen here in February, warned China Thursday that it risked "technological isolation" for developing unique technical standards of its own that also are shutting out... en.kioskea.net/actualites/us-warns-china-of-technological-isolation-10358-actualite.php3
UNIX system - Commands Unix Commands Description Options ls lists the content of a directory -a Displays all files, including hidden files -I Displays a detailed listing -R Displays the files recursively (i.e. in the sub-directories) -d Displays only the directories and... en.kioskea.net/unix/unixcomm.php3
Operating systems - Directories A directory (also known as a folder) is an IT element that can contain files. Imagine a large dresser containing drawers in which files or other drawers are stored. A directory can in fact contain: files other directories Using the example of the... en.kioskea.net/systemes/repertoi.php3
File sharing in Windows XP File sharing involves making the content of one or more directories available through the network. All Windows systems have standard devices making it easy to share the content of a directory. However, file sharing may lead to security problems... en.kioskea.net/configuration-reseau/partage-fichiers.php3