<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1043103" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1043103</link>
    <description></description>
    <language>en</language>
          <item>
    <title>if u wud use perl...
it wud</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238793</link>
    <description> &lt;p&gt;if u wud use perl...&lt;/p&gt;
&lt;p&gt;it wud be..&lt;/p&gt;
&lt;p&gt;print &quot;system(ls -l)&quot;;&lt;/p&gt;
 </description>
     <pubDate>Fri, 27 Feb 2009 14:12:16 +0000</pubDate>
 <dc:creator>neodeepak</dc:creator>
 <guid isPermaLink="false">comment 1238793 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Are you pointing to the</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238749</link>
    <description> &lt;p&gt;Are you pointing to the correct DIR?&lt;/p&gt;
&lt;p&gt;What exactly did you put as per pr0gr4mm3rs code:&lt;br /&gt;
&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;/* change the directory to the location with the PowerPoint files */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$files &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;scandir&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;powerpoints&#039;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;And what is the DIR (folder) where the powerpoint files are?&lt;/p&gt;
 </description>
     <pubDate>Thu, 26 Feb 2009 09:03:49 +0000</pubDate>
 <dc:creator>greg</dc:creator>
 <guid isPermaLink="false">comment 1238749 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Try running the script on a</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238727</link>
    <description> &lt;p&gt;Try running the script on a local filesystem and see if it helps.&lt;/p&gt;
 </description>
     <pubDate>Wed, 25 Feb 2009 17:49:29 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1238727 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Here&#039;s the Error</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238723</link>
    <description> &lt;p&gt;Here&#039;s the Error Log:&lt;/p&gt;
&lt;p&gt;Warning: scandir(files) [function.scandir]: failed to open dir: No error in \\nas24ent\domains\h\mydomain.org\user\htdocs\files\myarray.php on line 4&lt;/p&gt;
&lt;p&gt;Warning: scandir() [function.scandir]: (errno 0): No error in \\nas24ent\domains\h\mydomain.org\user\htdocs\files\myarray.php on line 4&lt;/p&gt;
&lt;p&gt;Warning: Invalid argument supplied for foreach() in \\nas24ent\domains\h\mydomain.org\user\htdocs\files\myarray.php on line 7&lt;/p&gt;
&lt;p&gt;Warning: sort() expects parameter 1 to be array, boolean given in \\nas24ent\domains\h\mydomain.org\user\htdocs\files\myarray.php on line 14&lt;/p&gt;
 </description>
     <pubDate>Wed, 25 Feb 2009 15:25:47 +0000</pubDate>
 <dc:creator>UK_Dave</dc:creator>
 <guid isPermaLink="false">comment 1238723 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks Shaggy, but</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238657</link>
    <description> &lt;p&gt;Thanks Shaggy, but unfortunately my hosting company says it does not allow indexing on its servers. That&#039;s one reason for this request. Currently I have provided an FTP link to the folder, but it&#039;s very slow to show up - presumably due to icon drawing by browsers, and is not therefore very satisfactory. &lt;/p&gt;
&lt;p&gt;I&#039;ll post an error log for pr0gr4mm3r soon.&lt;/p&gt;
&lt;p&gt;Dave.&lt;/p&gt;
 </description>
     <pubDate>Mon, 23 Feb 2009 10:36:10 +0000</pubDate>
 <dc:creator>UK_Dave</dc:creator>
 <guid isPermaLink="false">comment 1238657 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Using Apache and lazy like</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238610</link>
    <description> &lt;p&gt;Using Apache and lazy like me?&lt;/p&gt;
&lt;p&gt;In the config, &#039;AllowIndexes&#039; on the directory you are storing your PPT files in.&lt;br /&gt;
Apache will just show a directory listing of the files in the dir to the http client&lt;/p&gt;
&lt;p&gt;No scripting necessary.  If you aren&#039;t using Apache, I&#039;m sure whatever other web server you are using has the equivalent.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br /&gt;
Shaggy&lt;/p&gt;
 </description>
     <pubDate>Sun, 22 Feb 2009 04:56:25 +0000</pubDate>
 <dc:creator>Shaggy</dc:creator>
 <guid isPermaLink="false">comment 1238610 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>I tried the original script</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238588</link>
    <description> &lt;blockquote&gt;&lt;p&gt;I tried the original script and got an error&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Can you post the error?&lt;/p&gt;
 </description>
     <pubDate>Sat, 21 Feb 2009 15:36:23 +0000</pubDate>
 <dc:creator>pr0gr4mm3r</dc:creator>
 <guid isPermaLink="false">comment 1238588 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Sorry guys, but not being</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238579</link>
    <description> &lt;p&gt;Sorry guys, but not being too familiar with PHP I&#039;m lost with this.&lt;/p&gt;
&lt;p&gt;I need to know exactly what to do here - I&#039;m OK saving the file as a .php, but Greg&#039;s variation has confused me. I tried the original script and got an error, so I need a complete script, I need to know exactly what to edit to make it detect the files, and I need to know where is the best place to upload it.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;Dave.&lt;/p&gt;
 </description>
     <pubDate>Sat, 21 Feb 2009 12:00:36 +0000</pubDate>
 <dc:creator>UK_Dave</dc:creator>
 <guid isPermaLink="false">comment 1238579 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>Thanks Greg, but can I ask</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238543</link>
    <description> &lt;p&gt;Thanks Greg, but can I ask you to put the whole script together? I&#039;m not into writing them - just using them - and that very rarely.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Dave.&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2009 15:47:21 +0000</pubDate>
 <dc:creator>UK_Dave</dc:creator>
 <guid isPermaLink="false">comment 1238543 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>One note I would add would</title>
    <link>https://www.webmaster-forums.net/webmasters-corner/show-folders-contents-file-list-browser#comment-1238541</link>
    <description> &lt;p&gt;One note I would add would be to change the check for the file extension:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;$aryExt = array(&amp;#039;PPT&amp;#039;,&amp;#039;PPS&amp;#039;); // Place towards top of file &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;$strExt = strtoupper(substr($value,strrpos($value,&amp;#039;.&amp;#039;)+1));&lt;br /&gt;if (in_array($aryExt,$strExt) || $value==$_SERVER[&amp;#039;SCRIPT_FILENAME&amp;#039;]) {&lt;br /&gt;&amp;nbsp;&amp;nbsp; unset($files[$field]);&lt;br /&gt;}&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;This accomplishes three things:
&lt;ol&gt;
&lt;li&gt;Prevents a file like &quot;testppt&quot; (no extension) from matching.&lt;/li&gt;
&lt;li&gt;Makes it easy to take this code and use it in other directories for other file types. As the note says, put the first part towards the top of the file for easier finding and/or changing.&lt;/li&gt;
&lt;li&gt;If you were to use this to list out .php files, the code will also prevent the listing of itself. (generally, something like this would just be index.php, but I had it use the actual script name in case you save it as something else&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;&lt;p&gt;-Greg&lt;/p&gt;
 </description>
     <pubDate>Fri, 20 Feb 2009 15:25:51 +0000</pubDate>
 <dc:creator>Greg K</dc:creator>
 <guid isPermaLink="false">comment 1238541 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
