<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>H.-Peter Pfeufer &#187; Verzeichnis</title>
	<atom:link href="http://ppfeufer.de/tag/verzeichnis/feed/" rel="self" type="application/rss+xml" />
	<link>http://ppfeufer.de</link>
	<description>Webentwickler und WordPress-Freund</description>
	<lastBuildDate>Thu, 23 May 2013 14:19:45 +0000</lastBuildDate>
	<language>de-DE</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<atom:link rel='hub' href='http://ppfeufer.de/?pushpress=hub'/>
		<item>
		<title>Apache: Verzeichnisinhalte vom Webserver nicht anzeigen lassen</title>
		<link>http://ppfeufer.de/apache-verzeichnisinhalte-vom-webserver-nicht-anzeigen-lassen/</link>
		<comments>http://ppfeufer.de/apache-verzeichnisinhalte-vom-webserver-nicht-anzeigen-lassen/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 15:22:32 +0000</pubDate>
		<dc:creator>H.-Peter Pfeufer</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Directory-Listing]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Verzeichnis]]></category>

		<guid isPermaLink="false">http://ppfeufer.de/?p=2322</guid>
		<description><![CDATA[<div><img width="200" height="178" src="http://cdn.ppfeufer.de/wp-content/uploads/2010/11/apache_logo.png" class="attachment-small-feature wp-post-image" alt="Apache Logo" /></div>Im Normalfall liefert der Apache-Webserver für ein Verzeichnis, welches keine index.html / index.php oder eine andere definierte Index-Datei enthält eine Fehlermeldung zurück. Nun kann es jedoch sein, dass dies nicht der Fall ist und der Server einfach den Verzeichnisinhalt anzeigt. &#8230;</p><p class="read-more"><a class="more-link" href="http://ppfeufer.de/apache-verzeichnisinhalte-vom-webserver-nicht-anzeigen-lassen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div><img width="200" height="178" src="http://cdn.ppfeufer.de/wp-content/uploads/2010/11/apache_logo.png" class="attachment-small-feature wp-post-image" alt="Apache Logo" /></div><p>Im Normalfall liefert der Apache-Webserver für ein Verzeichnis, welches keine index.html / index.php oder eine andere definierte Index-Datei enthält eine Fehlermeldung zurück.</p>
<p>Nun kann es jedoch sein, dass dies nicht der Fall ist und der Server einfach den Verzeichnisinhalt anzeigt. Dies ist natürlich bei öffentlichen Server selten gewünscht und auch etwas ärgerlich.</p>
<p>Dies zu verhindern, gibt es drei Wege, die ich hier vorstellen möchte.<br />
<span id="more-2322"></span></p>
<h2>A) Konfiguration des Apache-Servers anpassen</h2>
<p>Mit Konfiguration ist die Konfiguration des Apache-Servers gemeint. Diese befindet sich meist in der Datei <strong>httpd.conf</strong>, welche im Verzeichnis des Apache zu finden ist. Bei Linux kann dies jedoch &#8211; je nach Distribution &#8211; abweichend sein. Diese alle aufzuzählen sprengt jedoch den Rahmen dieses Artikels. Also gehen wir davon aus, dass sich dies in der <strong>httpd.conf</strong> befindet.<br />
<em>(Der geübte Administrator wird die richtige Datei schnell finden)</em></p>
<p>In diese Datei wird folgender Code eingefügt:</p>
<div class="codecolorer-container apache geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/var/www&quot;</span>&gt;<br />
<span style="color: #00007f;">Options</span> -<span style="color: #0000ff;">Indexes</span><br />
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span><br />
<span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span><br />
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;</div></td></tr></tbody></table></div>
<p>Damit ist das Directory-Listing für alle Unterverzeichnisse von <em>/var/www</em> abgeschalten. Soll dies nun für einzelne Verzeichnisse wieder aktiviert werden, weil ihr einen Download-Ordner habt, so kann auch dies mit einem weiteren Eintrag für jeden Ordner realisiert werden. <em>(Beispiel für /var/www/domain/download)</em></p>
<div class="codecolorer-container apache geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="apache codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&lt;<span style="color: #000000; font-weight:bold;">Directory</span> <span style="color: #7f007f;">&quot;/var/www/domain/download&quot;</span>&gt;<br />
<span style="color: #00007f;">Options</span> +<span style="color: #0000ff;">Indexes</span><br />
<span style="color: #00007f;">Order</span> <span style="color: #00007f;">allow</span>,<span style="color: #00007f;">deny</span><br />
<span style="color: #00007f;">Allow</span> from <span style="color: #0000ff;">all</span><br />
&lt;/<span style="color: #000000; font-weight:bold;">Directory</span>&gt;</div></td></tr></tbody></table></div>
<h2>B) Indexdateien erstellen</h2>
<p>Hat man keinen Einfluss auf die Konfigurationsdateien des Server, weil die Seite zum Beispiel bei einem Hoster liegt, oder man traut sich nicht an diese Dateien, so hat man die Möglichkeit in den entsprechenden Verzeichnissen eine Index-Datei zu erstellen. Diese tragen im Allgemeinen den Namen <strong>index.php</strong> oder <strong>index.html</strong> und es spielt fast keine Rolle, für welche man sich entscheidet. Wichtig ist jedoch zu wissen, wenn man sich für die <strong>index.php</strong> entscheidet, sollte der Server auch in der Lage sein, PHP interpretieren zu können. Ist dies nicht der Fall, bleibt nur die <strong>index.html</strong> über.</p>
<p>In beiden Fällen reicht es jedoch aus, wenn die Dateien leer sind. Es muss als nicht drin stehen, was auch besser so ist, denn somit liegt der Verdacht nicht ganz so nahe, das hier nun eigentlich Dateien im Browser angezeigt werden. Der Browser selbst meldet sich dann mit einer komplett leeren &#8211; also weissen &#8211; Seite zurück.</p>
<p>Warum zeigt der Browser nun nichts an?<br />
Nun, dies ist schnell erklärt. Durch die Serverkonfiguration sind Index-Dateien spezifiziert. Somit reicht es aus, wenn man nur das Verzeichnis angibt und es wird automatisch eine solche Index-Datei geladen. Ist diese nun leer, wird nichts angezeigt. Also auch keine Verzeichnisauflistung.</p>
<h2>C) .htacces-Datei erstellen</h2>
<p>Wem es nun viel zu viel Arbeit ist in jedem Verzeichnis, welches nicht aufgelistet werden soll, eine Index-Datei zu erstellen, der kann dies auch schnell mit nur einer Datei, der <strong>.htaccess</strong> erledigen. Diese legt man am besten im Root-Verzeichnis des Webservers ab. Also in dem Verzeichnis, in dem auch die index.php eurer Webseite ist. In diese <strong>.htaccess</strong> schreibt ihr folgenden Code hinein.</p>
<div class="codecolorer-container text geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Options -Indexes</div></td></tr></tbody></table></div>
<p>Soll dies nun für einzelne Verzeichnisse wieder aktiviert werden, weil ihr einen Download-Ordner habt, so kann auch dies mit einer weiteren <strong>.htaccess</strong> im betreffenden Order wieder eingeschaltet werden.</p>
<div class="codecolorer-container text geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Options +Indexes</div></td></tr></tbody></table></div>
<p>[info]Der Punkt [.] vor der <strong>.htaccess</strong> ist kein persönlicher Fetisch von mir, sondern erforderlich. Dies kommt aus der Linuxwelt und zeichnet somit eine &#8220;versteckte&#8221; Datei aus.[/info]</p>
<p>Ich wünsche euch viel Erfolg und scheut euch nicht bei Fragen die Kommentare zu nutzen :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://ppfeufer.de/apache-verzeichnisinhalte-vom-webserver-nicht-anzeigen-lassen/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Verzeichnis auf einem Webserver auslesen und auflisten (mit Angabe der Dateigrößen)</title>
		<link>http://ppfeufer.de/verzeichnis-auf-einem-webserver-auslesen-und-auflisten-mit-angabe-der-dateigroessen/</link>
		<comments>http://ppfeufer.de/verzeichnis-auf-einem-webserver-auslesen-und-auflisten-mit-angabe-der-dateigroessen/#comments</comments>
		<pubDate>Sat, 04 Apr 2009 10:35:21 +0000</pubDate>
		<dc:creator>H.-Peter Pfeufer</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Dateigröße]]></category>
		<category><![CDATA[HowTo]]></category>
		<category><![CDATA[PHP-Funktion]]></category>
		<category><![CDATA[Verzeichnis]]></category>

		<guid isPermaLink="false">http://ppfeufer.de/?p=167</guid>
		<description><![CDATA[Ich habe gerade wieder in einem Forum die Frage gelesen ob es mit HTML möglich ist, den Inhalt eines Verzeichnisses auszulesen und auszugeben. Mit reinem HTML nicht, aber mit Hilfe von etwas PHP ist dies durchaus möglich. Dazu wird ein &#8230;</p><p class="read-more"><a class="more-link" href="http://ppfeufer.de/verzeichnis-auf-einem-webserver-auslesen-und-auflisten-mit-angabe-der-dateigroessen/">Weiterlesen <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Ich habe gerade wieder in einem Forum die Frage gelesen ob es mit HTML möglich ist, den Inhalt eines Verzeichnisses auszulesen und auszugeben.</p>
<p>Mit reinem HTML nicht, aber mit Hilfe von etwas PHP ist dies durchaus möglich.</p>
<p>Dazu wird ein kleines Script benötigt, in welchem das Verzeichnis, das ausgelesen werden soll definiert wird.<br />
<span id="more-167"></span></p>
<div class="codecolorer-container php geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$folder</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'verzeichnis/'</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Hier wird der relative Pfad, ausgehend vom Script selbst angegeben.<br />
Auch ist der / am Ende wichtig, da dieser im weiteren Verlauf des Scriptes so gebraucht wird.</p>
<p>Als nächstes muss das angegebene Verzeichnis geöffnet werden.</p>
<div class="codecolorer-container php geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000088;">$open</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/opendir"><span style="color: #990000;">opendir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$folder</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></td></tr></tbody></table></div>
<p>Ausgelesen wird das Verzeichnis nun mittels <em>readdir()</em> in einer <em>while</em>-Schleife.</p>
<div class="codecolorer-container php geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/readdir"><span style="color: #990000;">readdir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$open</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #009933; font-style: italic;">/**<br />
&nbsp; &nbsp; &nbsp;* some action<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Innerhalb dieser <em>while</em>-Schleife werden auch die Daten verarbeitet.</p>
<p>Um die Dateigröße anzeigen zu lassen bediehnt man sich einer kleinen Funktion, welche bereits schon hier im Blog vorgestellt wurde.<br />
<a href="http://ppfeufer.de/dateigroesse-anzeigen-lassen/">Dateigröße anzeigen lassen</a></p>
<p>Um es nicht zu spannend zu machen, hier das komplette Script.<br />
Ich habe die Auflistung der Dateien in eine Tabelle gepackt, damit es übersichtlich bleibt.</p>
<div class="codecolorer-container php geshi syntaxhighlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:99%;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br />52<br />53<br />54<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Berechnung der Dateigröße<br />
&nbsp;*<br />
&nbsp;* @param string $URL - Pfad zur Datei<br />
&nbsp;* @return Dateigröße<br />
&nbsp;*/</span><br />
<span style="color: #000000; font-weight: bold;">function</span> Dateigroesse<span style="color: #009900;">&#40;</span><span style="color: #000088;">$URL</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000088;">$Groesse</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/filesize"><span style="color: #990000;">filesize</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$URL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Groesse</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/number_format"><span style="color: #990000;">number_format</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Groesse</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' B'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elseif</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Groesse</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">1000000</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/number_format"><span style="color: #990000;">number_format</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Groesse</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">1024</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' kB'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/number_format"><span style="color: #990000;">number_format</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Groesse</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">1048576</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">','</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">' MB'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Verzeichnis öffnen<br />
&nbsp;*/</span><br />
<span style="color: #000088;">$folder</span> &nbsp; &nbsp; <span style="color: #339933;">=</span> <span style="color: #0000ff;">'verzeichnis/'</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$open</span> &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=</span> <a href="http://www.php.net/opendir"><span style="color: #990000;">opendir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$folder</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;table summary=&quot;text&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;colgroup&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;col width=&quot;30%&quot; /&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;col width=&quot;60%&quot; /&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;col width=&quot;10%&quot; /&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/colgroup&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;tr&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;th&gt;Datei&lt;/th&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;th&gt;Pfad&lt;/th&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;th&gt;Größe&lt;/th&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/tr&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #009933; font-style: italic;">/**<br />
&nbsp;* Verzeichnis auslesen<br />
&nbsp;*/</span><br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/readdir"><span style="color: #990000;">readdir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$open</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'.'</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">'..'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;tr&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;td&gt;&lt;a href=&quot;http://www.deinedomain.de/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$folder</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; target=&quot;_blank&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/a&gt;&lt;/td&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;td&gt;&lt;input onclick=&quot;this.select()&quot; class=&quot;file&quot; type=&quot;text&quot; readonly=&quot;readonly&quot; value=&quot;http://www.deinedomain.de/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$folder</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&quot; size=&quot;40&quot; /&gt;&lt;/td&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;td&gt;'</span> <span style="color: #339933;">.</span> Dateigroesse<span style="color: #009900;">&#40;</span><span style="color: #000088;">$folder</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'&lt;/td&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;/tr&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://www.php.net/closedir"><span style="color: #990000;">closedir</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$open</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Bei Fragen einfach die Kommentare nutzen.</p>
]]></content:encoded>
			<wfw:commentRss>http://ppfeufer.de/verzeichnis-auf-einem-webserver-auslesen-und-auflisten-mit-angabe-der-dateigroessen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
