Boards-United
Navigation
Zurück   Boards-United > [fetter-esel.de] Computerthemen, Technik, Support > Internet
Alle Fotoalben Interessensgemeinschaften Linkliste und Partner Werbung Tags RSS

html, die inhalt des (download-) Ordners anzeigt

Dies ist ein Thema über html, die inhalt des (download-) Ordners anzeigt im Internet-Forum, in der Kategorie [fetter-esel.de] Computerthemen, Technik, Support : Zitat: Zitat von Najius steht doch da: z.b. Code: <?php $handle=opendir ('.'); // . ist der aktuelle pfad while (false ...

Thema geschlossen

 

LinkBack Themen-Optionen Ansicht

  #11
Alt 10.08.2005, 16:35
Bergtürke
Gast
 
Benutzerbild von Bergtürke
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Zitat:
Zitat von Najius
steht doch da:

z.b.

Code:
<?php
$handle=opendir ('.'); // . ist der aktuelle pfad
while (false !== ($file = readdir ($handle))) {
echo "<a href='".$file."'>".$file."</a><br>";
}
closedir($handle);
?>
einfachin eine datei z.b. dir.php kopieren.
php muß natürlich aktiv sein
Eben probiert...
Super!!!

Genau das habe ich gesucht!!! Hatte gedacht, das wäre nur en Schipsel der Datei wo ich noch das "drumherum" brauche...

Bestimmte Dateitypen ausschliessen benötige ich im Moment noch nicht, könntest Du aber ja mal eben anhängen, wenn es kein Aufwand ist.

Cool wäre allerdings noch, wenn ich den Punkt für Übergeordnetes und Hauptverzeichniss löschen könnte.... Geht das auf die Schnelle???
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #12
Alt 10.08.2005, 17:47
Stammuser
 
Benutzerbild von nefaz
 
Registriert seit: 19.03.2002
Beiträge: 552
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
nefaz befindet sich auf einem aufstrebenden Ast
Activity Longevity
0/20 20/20
Today Beiträge
0/5 ssssss552
Code:
<?php
$handle=opendir ('.'); // . ist der aktuelle pfad
while (false !== ($file = readdir ($handle))) {
if($file != "." && $file != "..") echo "<a href='".$file."'>".$file."</a><br>";
}
closedir($handle);
?>
müsste das aktuelle und überverzeichnis rausfiltern
nefaz ist offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #13
Alt 10.08.2005, 19:43
Bergtürke
Gast
 
Benutzerbild von Bergtürke
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Supi!!!
Danke... alle Punkte weg!
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #14
Alt 12.08.2005, 01:20
Bergtürke
Gast
 
Benutzerbild von Bergtürke
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Auch auf das Risiko ihn, dass ich nerve...

Es wäre doch cool zu wissen, wie ich ereichen kann, dass bestimmte Dateitypen nicht angezeigt werden (z.B. die erstellte php-datei), bzw, wie ich erreichen kann, dass Unterordner nicht angezeigt werden.

Wenn mal jemand ein bissel Zeit dafür hätte wäre es nicht schlecht zu wissen, wie das geht.
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #15
Alt 12.08.2005, 02:40
Naji
Gast
 
Benutzerbild von Naji
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Code:
<?php
 $handle=opendir ('.'); // . ist der aktuelle pfad
 while (false !== ($file = readdir ($handle))) {
   if($file != "." 
	&& $file != ".."
	&& $file != "anzeige.php"
// ..... hier einfügen was nicht angezeigt werden soll
      && $file != "unterverzeichniss"
 ) echo "<a href='".$file."'>".$file."
";
 
 }
 closedir($handle);
 ?>
ne schnelle variante ist z.b. einfach die files da einfügen die nicht angezeigt werden sollen
oder den ausdruck umdrehen, und ne positiv liste drauß machen, z.b. alle .jpg
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #16
Alt 12.08.2005, 15:26
Stammuser
 
Benutzerbild von nefaz
 
Registriert seit: 19.03.2002
Beiträge: 552
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
nefaz befindet sich auf einem aufstrebenden Ast
Activity Longevity
0/20 20/20
Today Beiträge
0/5 ssssss552
um unterverzeichnisse und bestimmte dateien zu filtern:
Code:
<?php
$ignore=array("bild01.jpg","geheim.txt","test.xy");

$handle=opendir ('.'); // . ist der aktuelle pfad
while (false !== ($file = readdir ($handle))) {
if($file != "." && $file != ".." && !is_dir($file) && !in_array($file,$ignore)) echo "<a href='".$file."'>".$file."</a><br>";
}
closedir($handle);
?>
hoffe mal das ist selbstklärend, ansonnsten nachfragen
nefaz ist offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #17
Alt 12.08.2005, 20:09
Bergtürke
Gast
 
Benutzerbild von Bergtürke
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Danke ihr beiden!!!

Habe beide Versionen jetzt probiert und mich für die zweite entschieden, da die Dateien da untereinander und nicht lückenlos hintereinander gelistet werden.

Ich glaube jetzt ´bin ich restlos glücklich!

Womit habt Ihr angefangen PHP zu lernen???
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #18
Alt 12.08.2005, 23:16
Naji
Gast
 
Benutzerbild von Naji
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
irgendwie is da das

</a><br>"

beim copieren verloren gegangen. das <br> macht übrigens den zeilenvorschub
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #19
Alt 13.08.2005, 02:20
Bergtürke
Gast
 
Benutzerbild von Bergtürke
 
Beiträge: n/a
Activity Longevity
0/20 0/20
Today Beiträge
sssssssss
Zitat:
Zitat von Najius
irgendwie is da das

</a><br>"

beim copieren verloren gegangen. das <br> macht übrigens den zeilenvorschub
Das das <br> den Zeilenumbruch erzeugt ist mir bei html schon klar....
aber bei php.... ist für mich wie Böhmische Bohnenuppe ;-)

habe es mir auch nicht angesehen, sondern direkt das andere Probiert...
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
  #20
Alt 13.08.2005, 13:13
Stammuser
 
Benutzerbild von nefaz
 
Registriert seit: 19.03.2002
Beiträge: 552
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
nefaz befindet sich auf einem aufstrebenden Ast
Activity Longevity
0/20 20/20
Today Beiträge
0/5 ssssss552
habe mir vor etwa 3 jahren dieses buch hier zugelegt: http://www.amazon.de/exec/obidos/ASI...697128-3426131
danach nur noch nach funktionen auf http://de.php.net gesucht und die ausprobiert

nur mit regulären ausdrücken tu' ich mich noch schwer
nefaz ist offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Bookmark to LinkARENA!Bookmark to AskJeeves! Wong this Post!
Thema geschlossen

Lesezeichen