Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [php] [problem] ze zmienna w pasku adresu
tgR
post
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 24.12.2006

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


  1. <?php 
  2. if(file_exists($_GET["golak"]))
  3. {  
  4. include($_GET["golak"]); 
  5. } 
  6. else {
  7. $viewExt = '.*';
  8. $dirHandle = opendir('folder1/folder2/.');
  9. while ($file = readdir($dirHandle)) {
  10. if ($file != '.' && $file != '..' && eregi("($viewExt)$",$file) && !eregi("^index.",$file)) {
  11. $stack[] = $file;  
  12. }
  13. }
  14. closedir($dirHandle);
  15. sort($stack);
  16. foreach($stack as $value) 
  17. echo '<a href="skrypt.php?babcia=dziadek&golak=fodler1/folder2/'.$value.'">'.$value.'</a><br>'."n";
  18. }
  19. ; ?>



mam takie cos, i chce sie pozbyc "folder1/fodler2/" z adresu, zeby wyswietlalo tylko skrypt.php?babcia=dziadek&golak=$value a includowalo z podfolderow juz kombinuje moze z godzine i nie moge wykombinowac (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) domyslam sie ze trzeba folder1/folder2 dodac gdzies przy "include($_GET["go"]); " ale cos mi nie idzie ;/ wie ktos jak to zrobic ? z gory dzieki (:

Ten post edytował tgR 24.12.2006, 21:08:32
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
tgR
post
Post #2





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 24.12.2006

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


tylko ze jednak on tam jest (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) moge go poprostu zincludowac w oddzielnym skrypcie, w oddzielnym pliku i dziala samo include .. cos tutaj jest skopane (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) a tak jak jest w 1 poscie normalnie dziala ... wiec potwierdzenie ze plik jest ..

  1. <?php
  2. if(file_exists('folder1/folder2/'.$_GET["golak"]))
  3. {  
  4. include('folder1/folder2/'.$_GET["golak"]);
  5. ?>


i jak mam tak .. po wpisaniu nazwy pliku w adresie bez /folder1/folder2 dziala ... to chyba cos z listowaniem fodleru teraz nietak (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)


  1. <?php
  2. if(file_exists('/folder1/folder2/'.$_GET["golak"]))
  3. {  
  4. include('/folder1/folder2/'.$_GET["golak"]);
  5. ?>


tak nie wywala bledu ... ale nieotwiera pliku (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) , nawet jak recznie dopisze do adresu /fodler1/folder2/

zrobilem za pomoca mod_rewrite hyhy teraz wyglada ladnie (IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg) mozecie zamknac temat

Ten post edytował tgR 24.12.2006, 21:40:30
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: 17.10.2025 - 20:19