<?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>Backseat Surfer &#187; PHP</title>
	<atom:link href="http://www.backseatsurfer.de/category/web-engineering/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.backseatsurfer.de</link>
	<description>Between Ones and Zeros</description>
	<lastBuildDate>Mon, 21 Mar 2011 20:33:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Backseat Music: Books from Boxes</title>
		<link>http://www.backseatsurfer.de/2008/12/backseat-music-books-from-boxes/</link>
		<comments>http://www.backseatsurfer.de/2008/12/backseat-music-books-from-boxes/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 13:08:19 +0000</pubDate>
		<dc:creator>seb</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[alternativ]]></category>
		<category><![CDATA[books from boxes]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[maximo park]]></category>
		<category><![CDATA[rock]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.backseatsurfer.de/?p=956</guid>
		<description><![CDATA[Dieses Wochenende hatte ich irgendwie einen Alternative-Rückfall und habe Maximo Park rauf- und runtergehört.




Share and Enjoy:


	
	
	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p>Dieses Wochenende hatte ich irgendwie einen Alternative-Rückfall und habe Maximo Park rauf- und runtergehört.</p>
<p><center><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/X20UmfmTVnE&#038;hl=de&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/X20UmfmTVnE&#038;hl=de&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></center></p>



Share and Enjoy:


	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F&amp;title=Backseat%20Music%3A%20Books%20from%20Boxes" title="Digg"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F&amp;title=Backseat%20Music%3A%20Books%20from%20Boxes" title="del.icio.us"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F&amp;t=Backseat%20Music%3A%20Books%20from%20Boxes" title="Facebook"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F&amp;title=Backseat%20Music%3A%20Books%20from%20Boxes" title="Mixx"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F&amp;title=Backseat%20Music%3A%20Books%20from%20Boxes" title="Google"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F" title="Technorati"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" href="javascript:window.print();" title="Print this article!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" href="mailto:?subject=Backseat%20Music%3A%20Books%20from%20Boxes&amp;body=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F12%2Fbackseat-music-books-from-boxes%2F" title="E-mail this story to a friend!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/email_link.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.backseatsurfer.de/2008/12/backseat-music-books-from-boxes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error Operation</title>
		<link>http://www.backseatsurfer.de/2008/07/error-operation/</link>
		<comments>http://www.backseatsurfer.de/2008/07/error-operation/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 09:15:13 +0000</pubDate>
		<dc:creator>seb</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://rem.itg-em.de/blog/?p=10</guid>
		<description><![CDATA[Wie gestern schon erwähnt, bin ich kein großer Fan von nutzlosen 404 Fehlern. Natürlich ist es wichtig alle evtl. Fehler von der Seite abzufangen (Sicherheit undso), aber für die User, die einem nichts böses wollen und sich vielleicht nur vertippt haben oder sich nicht mehr an die genaue URL erinnern, ist es doch relativ frustrierend [...]]]></description>
			<content:encoded><![CDATA[<p>Wie gestern schon erwähnt, bin ich kein großer Fan von nutzlosen 404 Fehlern. Natürlich ist es wichtig alle evtl. Fehler von der Seite abzufangen (Sicherheit undso), aber für die User, die einem nichts böses wollen und sich vielleicht nur vertippt haben oder sich nicht mehr an die genaue URL erinnern, ist es doch relativ frustrierend immer wieder das schöne Error 404 Dokument vorgesetzt zu bekommen.</p>
<p>Also was tun?<br />
Das angenehmste wäre doch eine Suche aufzurufen, oder?</p>
<p>Deswegen hab ich mich gestern Abend hingesetzt und ein bisschen an der ErrorPage rumgedoktert. Doch leider ist die Dokumentation/API zur WordpressSuche nicht für jeden zugänglich (Sicherheit mal wieder..). Aus diesem Grund konnte ich nicht ganz nachvollziehen wie die Suche funktioniert und das Einzige Ergebnis war ein Redirect von der 404-Seite auf das Suchergebnis. Nicht übel, aber auch nicht das was ich wollte.<br />
Wie so oft kam mir aber der gute Freund Internet zur Hilfe und nach stöbern in verschiedenen Blogs, Dokumentationen und APIs fand ich schließlich die Seite von <a href="http://archgfx.net/blog/2007/geek/blogging/adding-search-results-to-wordpress-404-pages/trackback">Adam</a>. Dieser hatte sich genau meinem Problem angenommen und sogar einen Beispiel Code veröffentlicht.</p>
<p>Somit stand der neuen Error-Seite nichts im Wege.<br />
Es wird zwar immernoch die Error-Methode aufgerufen. Sollte aber ein Artikel mit ähnlichem Inhalt wie die RestURL vorhanden sein, werdet ihr mit einer freundlichen Nachricht darauf hingewiesen. Sollte es ein eindeutiges Ergebnis geben, werdet ihr sogar direkt auf den Post weitergeleitet.</p>
<p>So long,<br />
Seb</p>



Share and Enjoy:


	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F&amp;title=Error%20Operation" title="Digg"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F&amp;title=Error%20Operation" title="del.icio.us"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F&amp;t=Error%20Operation" title="Facebook"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F&amp;title=Error%20Operation" title="Mixx"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F&amp;title=Error%20Operation" title="Google"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F" title="Technorati"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" href="javascript:window.print();" title="Print this article!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" href="mailto:?subject=Error%20Operation&amp;body=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Ferror-operation%2F" title="E-mail this story to a friend!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/email_link.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.backseatsurfer.de/2008/07/error-operation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Indexverzeichnis</title>
		<link>http://www.backseatsurfer.de/2008/07/indexverzeichnis-erstellen/</link>
		<comments>http://www.backseatsurfer.de/2008/07/indexverzeichnis-erstellen/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 16:42:10 +0000</pubDate>
		<dc:creator>seb</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://rem.itg-em.de/blog/?p=8</guid>
		<description><![CDATA[Neben diesem Blog will ich noch eine WebSeite aufbauen. Diese soll Arbeiten, Lösungen von Übungsblätter und Ähnliches beinhalten. Aber um diese Daten schön und übersichtlich präsentieren zu können, braucht es mehr als nur einen Seitenindex.
Leider ist das letzte Mal als ich mich mit WebDesign auseinandergesetzt hab, schon sehr sehr lange her. Erfahrungen in PHP, CSS, [...]]]></description>
			<content:encoded><![CDATA[<p>Neben diesem Blog will ich noch eine WebSeite aufbauen. Diese soll Arbeiten, Lösungen von Übungsblätter und Ähnliches beinhalten. Aber um diese Daten schön und übersichtlich präsentieren zu können, braucht es mehr als nur einen Seitenindex.<br />
Leider ist das letzte Mal als ich mich mit WebDesign auseinandergesetzt hab, schon sehr sehr lange her. Erfahrungen in PHP, CSS, xml habe ich nur wenig.</p>
<p>In diesem Blog könnt ihr (unteranderem) verfolgen, wie ich langsam meine Seite aufbaue, verfolständige und verbessre.<br />
Beginnen möchte ich heute mit dem erstellen eines Indexes.<br />
<span id="more-8"></span></p>
<p>Here we go:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> createFileIndex<span style="color: #009900;">&#40;</span> <span style="color: #000088;">$start</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'.'</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//catch error</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span> <span style="color: #990000;">is_dir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//initalize stuff</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;table cellpadding=0 cellspacing=0 border=1 rules=rows&gt;&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$dirs</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$start</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;&lt;th&gt;NAME&lt;/th&gt;
		&lt;th style='width:50px'&gt;&lt;/th&gt;
		&lt;th align=center&gt;SIZE&lt;/th&gt;
		&lt;th style='width:20px'&gt;&lt;/th&gt;
		&lt;th align =center&gt;TYPE&lt;/th&gt;
		&lt;th style='width:20px'&gt;&lt;/th&gt;
		&lt;th align=center&gt;DATE CREATED&lt;/th&gt;
		&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #666666; font-style: italic;">//search iterative</span>
	<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #009900; font-weight: bold;">NULL</span> <span style="color: #339933;">!==</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_pop</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$dirs</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$dh</span> <span style="color: #339933;">=</span> <span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dh</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #666666; font-style: italic;">//skip current directory and php-files</span>
			<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;">||</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'..'</span> <span style="color: #339933;">||</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,-</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;php&quot;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$dir</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">'/'</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$file</span><span style="color: #339933;">;</span>
			<span style="color: #666666; font-style: italic;">/*
			if path is an directory
			=&gt; write into array
			else
			write the files attributes into the table
			*/</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #990000;">is_dir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$dirs</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$path</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #666666; font-style: italic;">//get file infos</span>
				<span style="color: #000088;">$ftime</span> <span style="color: #339933;">=</span> <span style="color: #990000;">gmdate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;d.M.y&quot;</span><span style="color: #339933;">,</span><span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
					<span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&amp;nbsp;&amp;nbsp;&amp;nbsp;&quot;</span>
					<span style="color: #339933;">.</span> <span style="color: #990000;">gmdate</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;H:i:s&quot;</span><span style="color: #339933;">,</span><span style="color: #990000;">filemtime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$fsize</span> <span style="color: #339933;">=</span> <span style="color: #990000;">round</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">filesize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$path</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">*</span> <span style="color:#800080;">.0009765625</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$ftype</span> <span style="color: #339933;">=</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strrchr</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: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">//to table</span>
				<span style="color: #000088;">$output</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;tr&gt;
				&lt;td&gt;&lt;a href='<span style="color: #006699; font-weight: bold;">$path</span>'&gt;<span style="color: #006699; font-weight: bold;">$file</span>&lt;/a&gt;&lt;/td&gt;
				&lt;td&gt;&lt;/td&gt;
				&lt;td align=center&gt;<span style="color: #006699; font-weight: bold;">$fsize</span> KB&lt;/td&gt;
				&lt;td&gt;&lt;/td&gt;
				&lt;td align=center&gt;<span style="color: #006699; font-weight: bold;">$ftype</span>&lt;/td&gt;
				&lt;td&gt;&lt;/td&gt;
				&lt;td align=right&gt;<span style="color: #006699; font-weight: bold;">$ftime</span>&lt;/td&gt;
				&lt;/tr&gt;&quot;</span><span style="color: #339933;">;</span>
				<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$output</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #990000;">closedir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dh</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;&lt;/table&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Der Algorithmus funktioniert wie folgt:</p>
<ol>
<li>Es wird ein Array &#8220;dirs&#8221; erstellt, in welches der Startpunkt (root) geschrieben wird.
<li>Das letzte Element aus &#8220;dirs&#8221; (ein Verzeichnis) wird herausgeholt und dabei entfernt, sollte das Entnehmen eines Elementes aus dem Array nicht möglich sein, wird der Algorithmus beendet.
<li>Das entnommene Verzeichnis wird nun auf der Suche nach Inhalten durchlaufen. Dabei wird unterschieden, ob es sich bei dem gefundenen Eintrag um ein Verzeichnis oder eine Datei handelt.
<ul>
<li>Fall 1 (Verzeichnis): Das gefundene Verzeichnis wird mit kompletten Pfad in das Array &#8220;dirs&#8221; geschrieben, um später auch in diesem Verzeichnis nach Datein zu suchen.
<li>Fall 2 (kein Verzeichnis): Es wurde eine Datei gefunden. Also holen wir uns von der Datei alle Attribute, die wir wünschen (Name, Größe, Typ, Erstelldatum), und schreiben alles in eine Tabelle.
</ul>
<li>Wenn das Verzeichnis komplett durchlaufen wurde, geht es wieder zu Punkt 2.
</ol>
<p>Als Ausgabe erhält man zum Beispiel:<br />
<center><img src="http://rem.itg-em.de/blog/wp-content/uploads/2008/7/php_ex_1.png" /></center></p>
<p>Das wars erstmal. Sobald alle Änderungen an dem Blog erledigt sind, geht es weiter. Dann wird hoffentlich an der Optik des Indexes gefeilt.</p>
<p>So long,<br />
Seb<br />
<center><a href="http://rem.itg-em.de/stuff/coding/php/dir_v1.txt" ><img style="vertical-align:-14px; margin-right:5px;" src="http://rem.itg-em.de/stuff/download.png" alt="" /><span style='font-size:16px;font-weight:bold'>Download Code</span></a></center></p>



Share and Enjoy:


	<a rel="nofollow" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F&amp;title=Indexverzeichnis" title="Digg"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F&amp;title=Indexverzeichnis" title="del.icio.us"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F&amp;t=Indexverzeichnis" title="Facebook"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.mixx.com/submit?page_url=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F&amp;title=Indexverzeichnis" title="Mixx"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/mixx.png" title="Mixx" alt="Mixx" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F&amp;title=Indexverzeichnis" title="Google"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a>
	<a rel="nofollow" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F" title="Technorati"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" href="javascript:window.print();" title="Print this article!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/printer.png" title="Print this article!" alt="Print this article!" class="sociable-hovers" /></a>
	<a rel="nofollow" href="mailto:?subject=Indexverzeichnis&amp;body=http%3A%2F%2Fwww.backseatsurfer.de%2F2008%2F07%2Findexverzeichnis-erstellen%2F" title="E-mail this story to a friend!"><img src="http://www.backseatsurfer.de/wp-content/plugins/sociable/images/email_link.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://www.backseatsurfer.de/2008/07/indexverzeichnis-erstellen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

