<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
<channel>
  <title>Linux Format forums</title>
  <link>http://www.linuxformat.com/forums/index.php</link>
  <description>Help, discussion, magazine feedback and more</description>
  <language>english</language>
  <copyright>(c) Copyright Tue May 21, 2013 4:19 pm by Linux Format forums</copyright>
  <managingEditor>webmaster@linuxformat.com</managingEditor>
  <webMaster>webmaster@linuxformat.com</webMaster>
  <pubDate>Tue May 21, 2013 4:19 pm</pubDate>
  <lastBuildDate>Tue May 21, 2013 4:19 pm</lastBuildDate>
  <docs>http://backend.userland.com/rss</docs>
  <generator>phpBB2 RSS Syndication Mod by Lucas</generator>
  <ttl>1</ttl>

  <image>
    <title>Linux Format forums</title>
    <url></url>
    <link>http://www.linuxformat.com/forums/</link>
    <description>Help, discussion, magazine feedback and more</description>
  </image>

                                      <item>
                                        <title>RE: How to list the contents of a folder on a web server?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=50597#50597</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=19488'&gt;JS&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Wed Oct 10, 2007 5:25 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      Alternatively, if you can't do htaccess but have PHP, then the following would work as a simple, minimal index.php:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt; PHP index lister &amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt; Directory listing &amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
&lt;br /&gt;
# Change the . below to another directory name&lt;br /&gt;
# if you want to list the contents of a different directory&lt;br /&gt;
$handle = opendir&amp;#40;'.'&amp;#41;;&lt;br /&gt;
&lt;br /&gt;
if &amp;#40;$handle&amp;#41; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;while &amp;#40;false !== &amp;#40;$file = readdir&amp;#40;$handle&amp;#41;&amp;#41;&amp;#41; &amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;# The if clause below is only necessary&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;# if you don't want to list this file and hidden files&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;# &amp;#40;Leaving it is a good idea&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;if &amp;#40;&amp;#40;$file&amp;#91;0&amp;#93; != &amp;quot;.&amp;quot;&amp;#41; and &amp;#40;$file != &amp;quot;index.php&amp;quot;&amp;#41;&amp;#41;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#123;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;print &amp;quot;&amp;lt;a href=\&amp;quot;$file\&amp;quot;&amp;gt;$file&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;\n&amp;quot;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;#125;&lt;br /&gt;
&amp;#125;&lt;br /&gt;
closedir&amp;#40;$handle&amp;#41;;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
I've used it (well, a slightly modified version) myself, and it works for me.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=50597#50597</comments>
                                        <author>JS</author>
                                        <pubDate>Wed Oct 10, 2007 5:25 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=50597#50597</guid>
                                      </item>
                                      <item>
                                        <title>RE: How to list the contents of a folder on a web server?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=45828#45828</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=25'&gt;M0PHP&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Jun 11, 2007 9:02 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      If you have access to the server then it is fairly easy - just enable directory listings &lt;img src=&quot;images/smiles/icon_smile.gif&quot; alt=&quot;Smile&quot; border=&quot;0&quot; /&gt;&lt;br /&gt;
&lt;br /&gt;
To expand on that - if it's Apache and you do have access to the server config - just put this line in the directory configuration of the Apache config:&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;table width=&quot;90%&quot; cellspacing=&quot;1&quot; cellpadding=&quot;3&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;&lt;tr&gt; 	  &lt;td&gt;&lt;span class=&quot;genmed&quot;&gt;&lt;b&gt;Code:&lt;/b&gt;&lt;/span&gt;&lt;/td&gt;	&lt;/tr&gt;	&lt;tr&gt;	  &lt;td class=&quot;code&quot;&gt;Options Indexes&lt;/td&gt;	&lt;/tr&gt;&lt;/table&gt;&lt;span class=&quot;postbody&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Or you could also add that very same line to a &lt;span style=&quot;font-weight: bold&quot;&gt;.htaccess&lt;/span&gt; file (in the directory you want listings of) if you don't have access to the server but are still allowed htaccess.</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=45828#45828</comments>
                                        <author>M0PHP</author>
                                        <pubDate>Mon Jun 11, 2007 9:02 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=45828#45828</guid>
                                      </item>
                                      <item>
                                        <title>How to list the contents of a folder on a web server?</title>
                                        <link>http://www.linuxformat.com/forums/viewtopic.php?p=45825#45825</link>
                                        <description>&lt;br /&gt;
                                      Author: &lt;a href='http://www.linuxformat.com/forums/profile.php?mode=viewprofile&amp;u=12056'&gt;nitromaster&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
                                      Posted: Mon Jun 11, 2007 8:42 pm&lt;br /&gt;&lt;br /&gt;
                                      &lt;br /&gt;&lt;br /&gt;
                                      title says it all,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
is this possible?</description>
                                        <comments>http://www.linuxformat.com/forums/viewtopic.php?p=45825#45825</comments>
                                        <author>nitromaster</author>
                                        <pubDate>Mon Jun 11, 2007 8:42 pm</pubDate>
                                        <guid isPermaLink="true">http://www.linuxformat.com/forums/viewtopic.php?p=45825#45825</guid>
                                      </item></channel></rss>