<?xml version="1.0" encoding="utf-8"?><!-- generator="b2evolution/6.9.7-stable" -->
<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>https://www.bigsoft.co.uk/blog/?disp=comments</link>
		<atom:link rel="self" type="application/rss+xml" href="https://www.bigsoft.co.uk/blog/?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=6.9.7-stable"/>
		<ttl>60</ttl>
		<item>
			<title> Dretoot [Visitor] in response to: Auto generate web server index pages</title>
			<pubDate>Wed, 24 Mar 2010 07:26:14 +0000</pubDate>
			<dc:creator><span class="user anonymous" rel="bubbletip_comment_373">Dretoot</span> <span class="bUser-anonymous-tag">[Visitor]</span></dc:creator>
			<guid isPermaLink="false">c373@https://www.bigsoft.co.uk/</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>https://www.bigsoft.co.uk/blog/2008/07/29/auto-generate-web-server-index-pages#c373</link>
		</item>
		<item>
			<title>davidnewcomb [Member] in response to: Auto generate web server index pages</title>
			<pubDate>Fri, 10 Oct 2008 08:00:24 +0000</pubDate>
			<dc:creator><a href="https://www.bigsoft.co.uk/?disp=user&amp;user_ID=1" title="Show the user profile" class="login user nowrap" rel="bubbletip_user_1"><span class="identity_link_username">davidnewcomb</span></a> <span class="bUser-member-tag">[Member]</span></dc:creator>
			<guid isPermaLink="false">c193@https://www.bigsoft.co.uk/</guid>
			<description>Yes - you can!</description>
			<content:encoded><![CDATA[Yes - you can!]]></content:encoded>
			<link>https://www.bigsoft.co.uk/blog/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 05:19:51 +0000</pubDate>
			<dc:creator><span class="user anonymous" rel="bubbletip_comment_192">Wiboon Warasittichai</span> <span class="bUser-anonymous-tag">[Visitor]</span></dc:creator>
			<guid isPermaLink="false">c192@https://www.bigsoft.co.uk/</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>https://www.bigsoft.co.uk/blog/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 11:37:54 +0000</pubDate>
			<dc:creator><span class="user anonymous" rel="bubbletip_comment_190">Andrew</span> <span class="bUser-anonymous-tag">[Visitor]</span></dc:creator>
			<guid isPermaLink="false">c190@https://www.bigsoft.co.uk/</guid>
			<description>&lt;p&gt;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;/p&gt;
&lt;p&gt;I see there is code like this but it&amp;#8217;s not complete (from php.net/opendir ):&lt;/p&gt;
&lt;p&gt;[codeblock lang=&quot;php&amp;#8221; line=&quot;1&amp;Prime;]
$content_array = array();&lt;/p&gt;
&lt;p&gt;//set current working directory
$dirname = &amp;#8220;C:\temp&quot;;&lt;/p&gt;
&lt;p&gt;//Load Directory Into Array
$handle=opendir($dirname);
$i=0;
while ($file = readdir($handle))
if ($file != &amp;#8220;.&amp;#8221; &amp;amp;&amp;amp; $file != &amp;#8220;..&quot;)
{&lt;/p&gt;
&lt;pre class=&quot;codeblock&quot;&gt;&lt;code&gt;$content_array[$i][0] = $file;
$content_array[$i][1] = date (&quot;Y m d&quot;, filemtime($dirname.&quot;/&quot;.$file));
$i++;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;}
//close the directory handle
closedir($handle);&lt;/p&gt;
&lt;p&gt;// these lines sort the contents of the directory by the date
foreach($content_array as $res)&lt;/p&gt;
&lt;pre class=&quot;codeblock&quot;&gt;&lt;code&gt;$sortAux[] = $res[1];&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;array_multisort($sortAux, SORT_ASC, $content_array);
[/codeblock]&lt;/p&gt;</description>
			<content:encoded><![CDATA[<p>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.</p>
<p>I see there is code like this but it&#8217;s not complete (from php.net/opendir ):</p>
<p>[codeblock lang="php&#8221; line="1&Prime;]
$content_array = array();</p>
<p>//set current working directory
$dirname = &#8220;C:\temp";</p>
<p>//Load Directory Into Array
$handle=opendir($dirname);
$i=0;
while ($file = readdir($handle))
if ($file != &#8220;.&#8221; &amp;&amp; $file != &#8220;..")
{</p>
<pre class="codeblock"><code>$content_array[$i][0] = $file;
$content_array[$i][1] = date ("Y m d", filemtime($dirname."/".$file));
$i++;</code></pre>
<p>}
//close the directory handle
closedir($handle);</p>
<p>// these lines sort the contents of the directory by the date
foreach($content_array as $res)</p>
<pre class="codeblock"><code>$sortAux[] = $res[1];</code></pre>
<p>array_multisort($sortAux, SORT_ASC, $content_array);
[/codeblock]</p>]]></content:encoded>
			<link>https://www.bigsoft.co.uk/blog/2008/07/29/auto-generate-web-server-index-pages#c190</link>
		</item>
			</channel>
</rss>
