<?xml version="1.0" encoding="iso-8859-1"?><!-- generator="b2evolution/3.3.3" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Mr N - Latest comments on Auto generate web server index pages</title>
		<link>http://www.bigsoft.co.uk/blog/index.php?disp=comments</link>
		<atom:link rel="self" type="application/rss+xml" href="http://www.bigsoft.co.uk/blog/index.php?tempskin=_rss2&#38;disp=comments&#38;p=60" />
		<description></description>
		<language>en-GB</language>
		<docs>http://backend.userland.com/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=3.3.3"/>
		<ttl>60</ttl>
				<item>
			<title>Dretoot [Visitor] in response to: Auto generate web server index pages</title>
			<pubDate>Wed, 24 Mar 2010 08:26:14 +0000</pubDate>
			<dc:creator>Dretoot [Visitor]</dc:creator>
			<guid isPermaLink="false">c373@http://www.bigsoft.co.uk/blog/</guid>
			<description>Your writing is very elegant, very vivid and lively, I really like you, wish you continued to write better articles, I will often try to concern, oh!</description>
			<content:encoded><![CDATA[Your writing is very elegant, very vivid and lively, I really like you, wish you continued to write better articles, I will often try to concern, oh!]]></content:encoded>
			<link>http://www.bigsoft.co.uk/blog/index.php/2008/07/29/auto-generate-web-server-index-pages#c373</link>
		</item>
				<item>
			<title>David Newcomb [Member] in response to: Auto generate web server index pages</title>
			<pubDate>Fri, 10 Oct 2008 10:00:24 +0000</pubDate>
			<dc:creator>David Newcomb [Member]</dc:creator>
			<guid isPermaLink="false">c193@http://www.bigsoft.co.uk/blog/</guid>
			<description>Yes - you can!</description>
			<content:encoded><![CDATA[Yes - you can!]]></content:encoded>
			<link>http://www.bigsoft.co.uk/blog/index.php/2008/07/29/auto-generate-web-server-index-pages#c193</link>
		</item>
				<item>
			<title>Wiboon Warasittichai [Visitor] in response to: Auto generate web server index pages</title>
			<pubDate>Fri, 10 Oct 2008 07:19:51 +0000</pubDate>
			<dc:creator>Wiboon Warasittichai [Visitor]</dc:creator>
			<guid isPermaLink="false">c192@http://www.bigsoft.co.uk/blog/</guid>
			<description>Can you make directory list in a drop-down menu? Thanks.&lt;br /&gt;</description>
			<content:encoded><![CDATA[Can you make directory list in a drop-down menu? Thanks.<br />]]></content:encoded>
			<link>http://www.bigsoft.co.uk/blog/index.php/2008/07/29/auto-generate-web-server-index-pages#c192</link>
		</item>
				<item>
			<title>Andrew [Visitor] in response to: Auto generate web server index pages</title>
			<pubDate>Wed, 01 Oct 2008 13:37:54 +0000</pubDate>
			<dc:creator>Andrew [Visitor]</dc:creator>
			<guid isPermaLink="false">c190@http://www.bigsoft.co.uk/blog/</guid>
			<description>Thank you - I like option 2 for php. Is there an easy way to incorporate the following code to sort the index page files by date? This would be useful for sites to list the most recent files near the top.&lt;br /&gt;
&lt;br /&gt;
I see there is code like this but it's not complete (from php.net/opendir ):&lt;br /&gt;
&lt;br /&gt;
[codeblock lang=&quot;php&quot; line=&quot;1&quot;]&lt;br /&gt;
$content_array = array();&lt;br /&gt;
&lt;br /&gt;
//set current working directory&lt;br /&gt;
$dirname = &quot;C:\temp&quot;;&lt;br /&gt;
&lt;br /&gt;
//Load Directory Into Array&lt;br /&gt;
$handle=opendir($dirname);&lt;br /&gt;
$i=0;&lt;br /&gt;
while ($file = readdir($handle))&lt;br /&gt;
if ($file != &quot;.&quot; &amp;amp;&amp;amp; $file != &quot;..&quot;)&lt;br /&gt;
{&lt;br /&gt;
    $content_array[$i][0] = $file;&lt;br /&gt;
    $content_array[$i][1] = date (&quot;Y m d&quot;, filemtime($dirname.&quot;/&quot;.$file));&lt;br /&gt;
    $i++;&lt;br /&gt;
}&lt;br /&gt;
//close the directory handle&lt;br /&gt;
closedir($handle);&lt;br /&gt;
&lt;br /&gt;
// these lines sort the contents of the directory by the date&lt;br /&gt;
foreach($content_array as $res)&lt;br /&gt;
    $sortAux[] = $res[1];&lt;br /&gt;
array_multisort($sortAux, SORT_ASC, $content_array);&lt;br /&gt;
[/codeblock]</description>
			<content:encoded><![CDATA[Thank you - I like option 2 for php. Is there an easy way to incorporate the following code to sort the index page files by date? This would be useful for sites to list the most recent files near the top.<br />
<br />
I see there is code like this but it's not complete (from php.net/opendir ):<br />
<br />
[codeblock lang="php" line="1"]<br />
$content_array = array();<br />
<br />
//set current working directory<br />
$dirname = "C:\temp";<br />
<br />
//Load Directory Into Array<br />
$handle=opendir($dirname);<br />
$i=0;<br />
while ($file = readdir($handle))<br />
if ($file != "." &amp;&amp; $file != "..")<br />
{<br />
    $content_array[$i][0] = $file;<br />
    $content_array[$i][1] = date ("Y m d", filemtime($dirname."/".$file));<br />
    $i++;<br />
}<br />
//close the directory handle<br />
closedir($handle);<br />
<br />
// these lines sort the contents of the directory by the date<br />
foreach($content_array as $res)<br />
    $sortAux[] = $res[1];<br />
array_multisort($sortAux, SORT_ASC, $content_array);<br />
[/codeblock]]]></content:encoded>
			<link>http://www.bigsoft.co.uk/blog/index.php/2008/07/29/auto-generate-web-server-index-pages#c190</link>
		</item>
			</channel>
</rss>
