<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1016789" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1016789</link>
    <description></description>
    <language>en</language>
          <item>
    <title>Re: interesting!</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097667</link>
    <description> &lt;blockquote class=&quot;bb-quote-body&quot;&gt;&lt;p&gt;Quote: &lt;em&gt;Originally posted by Suzanne &lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;My goal was to learn PHP while on maternity leave, but the maternity leave isn&#039;t really happening, so I&#039;ll have to learn it on the job.&lt;/strong&gt;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/doh.png&quot; title=&quot;Doh!&quot; alt=&quot;Doh!&quot; class=&quot;smiley-content&quot; /&gt; Doh!&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Jan 2002 06:48:55 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1097667 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>interesting!</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097658</link>
    <description> &lt;p&gt;I&#039;m just starting to explore the concept, but I, just today, made an index.php page that read the contents of a directory (all different kinds of images) and wrote code around them. Since there were over 80 images, this saved me a WHACK of time. I had them write the JavaScript for the rollovers, too.&lt;/p&gt;
&lt;p&gt;Very interesting.&lt;/p&gt;
&lt;p&gt;I am seeing all sorts of faster development coming.&lt;/p&gt;
&lt;p&gt;Thanks for the links, Mark, too. My goal was to learn PHP while on maternity leave, but the maternity leave isn&#039;t really happening, so I&#039;ll have to learn it on the job.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; Suzanne&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Jan 2002 03:13:32 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1097658 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097657</link>
    <description> &lt;p&gt;Yes, there are grep functions.  PHP doesn&#039;t function the same way PERL does with regex.  PHP requires you to put your regex in a function (whereas in perl, practically anywhere will do).&lt;/p&gt;
&lt;p&gt;PHP Docs:&lt;br /&gt;
&lt;a href=&quot;http://www.php.net/manual/en/function.ereg.php&quot; class=&quot;bb-url&quot;&gt;ereg()&lt;/a&gt;, &lt;a href=&quot;http://www.php.net/manual/en/function.ereg-replace.php&quot; class=&quot;bb-url&quot;&gt;ereg_replace()&lt;/a&gt;,&lt;br /&gt;
&lt;a href=&quot;http://www.php.net/manual/en/function.eregi.php&quot; class=&quot;bb-url&quot;&gt;eregi()&lt;/a&gt;, &lt;a href=&quot;http://www.php.net/manual/en/function.eregi-replace.php&quot; class=&quot;bb-url&quot;&gt;eregi_replace()&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.php.net/manual/en/ref.pcre.php&quot; class=&quot;bb-url&quot;&gt;LXXXIV. Regular Expression Functions (Perl-Compatible)&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.php.net/manual/en/function.preg-match.php&quot; class=&quot;bb-url&quot;&gt;preg_match()&lt;/a&gt;, &lt;a href=&quot;http://www.php.net/manual/en/function.preg-match-all.php&quot; class=&quot;bb-url&quot;&gt;preg_match_all()&lt;/a&gt;,  &lt;a href=&quot;http://www.php.net/manual/en/function.preg-replace.php&quot; class=&quot;bb-url&quot;&gt;preg_replace()&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You don&#039;t really need PHP or PERL to filter files...&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;$command &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;ls -w1 \&quot; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dir&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . \&quot;/*.htm* | awk &#039;BEGIN {FS=\\\&quot;/\\\&quot;} {print \\&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$NF&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;}&#039;\&quot;;&lt;br /&gt;exec(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$command&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dir_list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&lt;br /&gt;foreach (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$dir_list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file_list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; .= &#039;&amp;lt;li&amp;gt;&amp;lt;a href=\&quot;&#039; . &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; . &#039;\&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$file&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;\n&#039;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;I&#039;m doing something similar to parse out map files for my WAHL project.  I wrote a shell script a while ago to do this kind of stuff, and now I&#039;m copy &amp;amp; pasting it into my PHP.  &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/wink.png&quot; title=&quot;Wink&quot; alt=&quot;Wink&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Sun, 06 Jan 2002 03:03:24 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1097657 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097638</link>
    <description> &lt;p&gt;How so?&lt;/p&gt;
&lt;p&gt;I&#039;m intrigued!&lt;/p&gt;
&lt;p&gt;Of course, I&#039;m also just learning (duh!) so talk in small words.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; Suzanne&lt;/p&gt;
 </description>
     <pubDate>Sat, 05 Jan 2002 19:04:05 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1097638 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097620</link>
    <description> &lt;p&gt;You could probably optimise that code a fair way, if you wanted to. There&#039;s no grep function in PHP?&lt;/p&gt;
 </description>
     <pubDate>Sat, 05 Jan 2002 13:47:15 +0000</pubDate>
 <dc:creator>Wil</dc:creator>
 <guid isPermaLink="false">comment 1097620 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097598</link>
    <description> &lt;p&gt;That does help a bit, doesn&#039;t it?&lt;/p&gt;
 </description>
     <pubDate>Fri, 04 Jan 2002 20:36:32 +0000</pubDate>
 <dc:creator>Mark Hensler</dc:creator>
 <guid isPermaLink="false">comment 1097598 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title>got it!</title>
    <link>https://www.webmaster-forums.net/serverside-scripting/directory-listing-php#comment-1097568</link>
    <description> &lt;p&gt;while ($file_name = readdir($dir)) {&lt;br /&gt;
if (($file_name != &quot;.&quot;) &amp;amp;&amp;amp; ($file_name != &quot;..&quot;) &amp;amp;&amp;amp; ($file_name != &quot;index.php&quot;)) {&lt;br /&gt;
$file_list .= &quot;
&lt;li&gt;&lt;a&gt;$file_name&lt;/a&gt;&lt;/li&gt;
&lt;/p&gt;&lt;p&gt;\n&quot;;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Make sure the freaking variable is right!  Argh.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt; S&lt;/p&gt;
 </description>
     <pubDate>Fri, 04 Jan 2002 08:52:59 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1097568 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
