<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Leicester, Birmingham &#62; Midlands UK &#124; The SCube &#187; dreamsource</title>
	<atom:link href="http://www.thescube.com/tag/dreamsource/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thescube.com</link>
	<description>Leicester, Birmingham Web Design, Logo Design, Menu Printing, Business Card, Cheap, affordable, professional Web Development, Design and Logo Creation. Ideas Accomplished</description>
	<lastBuildDate>Mon, 06 Sep 2010 22:27:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>PHP Delete Directory Recursively</title>
		<link>http://www.thescube.com/blog/php-delete-directory-recursively/</link>
		<comments>http://www.thescube.com/blog/php-delete-directory-recursively/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 09:39:30 +0000</pubDate>
		<dc:creator>dreamsource</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP - MySql - Linux - Apache (LAMP)]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[dreamsource]]></category>

		<guid isPermaLink="false">http://www.thescube.com/?p=463</guid>
		<description><![CDATA[Most of the occasions we might face a scenario on deleting a directory and all its contents subdirectories. So I came up with a simple function to acheive this issue. This function uses php&#8217;s inbuilt functions such as file_exits, is_dir, is_link, unlink, scandir and rmdir. update: Incase you are facing trouble using  unlink() and when [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the occasions we might face a scenario on deleting a directory and all its contents subdirectories. So I came up with a simple function to acheive this issue. This function uses php&#8217;s inbuilt functions such as file_exits, is_dir, is_link, unlink, scandir and rmdir.</p>
<p>update: Incase you are facing trouble using  unlink() and when you get an error saying warning  Is dir. Also if you get error permission denied in windows xp. The below code will work for these issues.</p>
<p>$dir = &#8216;your_dir/&#8217;; // example.</p>
<p>function removeDir($dir)<br />
{<br />
if (!file_exists($dir)) return true;<br />
if (!is_dir($dir) || is_link($dir)) return unlink($dir);</p>
<p>foreach (scandir($dir) as $item)<br />
{<br />
if ($item == &#8216;.&#8217; || $item == &#8216;..&#8217;) continue;<br />
if (!removeDir($dir . &#8220;/&#8221; . $item))<br />
{</p>
<p>if (!removeDir($dir . &#8220;/&#8221; . $item)) return false;<br />
};<br />
}<br />
return rmdir($dir);<br />
}</p>
<p>Author: Srini</p>
<p>Website: Dreamsource</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thescube.com/blog/php-delete-directory-recursively/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
