<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PHP- Count Files In A Directory</title>
	<atom:link href="http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 09:42:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: Le</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/#comment-3399</link>
		<dc:creator>Le</dc:creator>
		<pubDate>Tue, 03 Apr 2012 05:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=27#comment-3399</guid>
		<description>Hi

Can any one help me to display 5 results in each page from a folder ...

Regards
Le</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Can any one help me to display 5 results in each page from a folder &#8230;</p>
<p>Regards<br />
Le</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eman</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/#comment-3222</link>
		<dc:creator>Eman</dc:creator>
		<pubDate>Sat, 21 Jan 2012 16:15:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=27#comment-3222</guid>
		<description>And if the case is that 

1. having only 1 directory lets suppose Images

2. Added category and categorized images category wise... 

3. Now want to count the images according to their category then what will be the code for this by counting images from 1 directory but for different categories... plz any one help....</description>
		<content:encoded><![CDATA[<p>And if the case is that </p>
<p>1. having only 1 directory lets suppose Images</p>
<p>2. Added category and categorized images category wise&#8230; </p>
<p>3. Now want to count the images according to their category then what will be the code for this by counting images from 1 directory but for different categories&#8230; plz any one help&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dragster</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/#comment-3168</link>
		<dc:creator>Dragster</dc:creator>
		<pubDate>Tue, 27 Dec 2011 17:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=27#comment-3168</guid>
		<description>Hey,
i edited it to count ALL files in the folder and not pictures
for those who want this code on a function
here it is
you have to define this:


$directory = &#039;&#039;;
if (glob($directory . &quot;*.*&quot;) != false)
{
 $filecount = count(glob($directory . &quot;*.*&quot;));
}
else
{
 $filecount = &#039;0x1&#039;;
}

and add this to your index or what ever! :)

</description>
		<content:encoded><![CDATA[<p>Hey,<br />
i edited it to count ALL files in the folder and not pictures<br />
for those who want this code on a function<br />
here it is<br />
you have to define this:</p>
<p>$directory = &#8221;;<br />
if (glob($directory . &#8220;*.*&#8221;) != false)<br />
{<br />
 $filecount = count(glob($directory . &#8220;*.*&#8221;));<br />
}<br />
else<br />
{<br />
 $filecount = &#8217;0&#215;1&#8242;;<br />
}</p>
<p>and add this to your index or what ever! <img src='http://www.brightcherry.co.uk/scribbles/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/#comment-3155</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Wed, 21 Dec 2011 18:15:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=27#comment-3155</guid>
		<description>Nice and simple, but anyone know how can we count the sub-directories as well.</description>
		<content:encoded><![CDATA[<p>Nice and simple, but anyone know how can we count the sub-directories as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: flav1o</title>
		<link>http://www.brightcherry.co.uk/scribbles/php-count-files-in-a-directory/#comment-2979</link>
		<dc:creator>flav1o</dc:creator>
		<pubDate>Wed, 26 Oct 2011 08:24:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.brightcherry.co.uk/scribbles/?p=27#comment-2979</guid>
		<description>Just a heads up. Remember to use relative path to the folder and not absolute path when using glob. 
Ex

Working:
$directory = &quot;whatever/wp-content/uploads/random/&quot;;

NOT Working
$directory = &quot;http://mydomain.com/whatever/wp-content/uploads/random/&quot;;


cheers</description>
		<content:encoded><![CDATA[<p>Just a heads up. Remember to use relative path to the folder and not absolute path when using glob.<br />
Ex</p>
<p>Working:<br />
$directory = &#8220;whatever/wp-content/uploads/random/&#8221;;</p>
<p>NOT Working<br />
$directory = &#8220;http://mydomain.com/whatever/wp-content/uploads/random/&#8221;;</p>
<p>cheers</p>
]]></content:encoded>
	</item>
</channel>
</rss>

