Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> readdir(), odrazu mowie zem noob
Kreton
post
Post #1





Grupa: Zarejestrowani
Postów: 345
Pomógł: 3
Dołączył: 20.02.2005

Ostrzeżenie: (0%)
-----


Kod
<?php
$dh = opendir ("/Galeria/");
while ($file = readdir ($dh)) {
print "$file\n";
}
closedir ($dh);
?>


skrypt czyta wszytkie pliki w katalogu,
jestem dopiero pocztkowym programista wiec pomozcie:
wyskakuje bład

Kod
Parse error: parse error, unexpected $ in /home3/gi/gim3e/readdir.php on line 7


HELP

Ten post edytował Kreton 14.03.2005, 17:16:27
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Kreton
post
Post #2





Grupa: Zarejestrowani
Postów: 345
Pomógł: 3
Dołączył: 20.02.2005

Ostrzeżenie: (0%)
-----


  1. <?php
  2. Warning: opendir(): Plik /Galeria/ jest w neidozwolonej sciezce! in /home3/gi/gim3e/readdir.php on line 2
  3.  
  4. Warning: opendir(/Galeria/): failed to open dir: Operation not permitted in /home3/gi/gim3e/readdir.php on line 2
  5.  
  6. Warning: readdir(): supplied argument is not a valid Directory resource in /home3/gi/gim3e/readdir.php on line 3
  7.  
  8. Warning: closedir(): supplied argument is not a valid Directory resource in /home3/gi/gim3e/readdir.php on line 6
  9.  
  10. ?>


wprowadzilem poprawki potem, z tym ze to kolejne bledy. Wydaje sie ze scieżka jest nieprawidłowa:

wydaje mi sie ze zamiast
  1. <?php
  2. $dh = opendir (&#092;"/Galeria/\");
  3. ?>

powinno byc
  1. <?php
  2. $dh = opendir (&#092;"/Galeria\");
  3. ?>


niestety teraz czekam na hosta zeby zaaktulaizował, ale chyba apacha zainstaluje na kompie

Ten post edytował Kreton 14.03.2005, 20:10:44
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 11.10.2025 - 06:52