Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP]Jak w listowaniu ukryć plik .php
thejerremi
post
Post #1





Grupa: Zarejestrowani
Postów: 9
Pomógł: 0
Dołączył: 31.08.2015

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


Mam ustawione listowanie w taki sposób:
Kod
<?php
// ustawienie kontroli błędów
// pominę ten blok w kolejnych przykładach
error_reporting(E_ALL);
ini_set('display_errors', 'on');
ini_set('display_startup_errors', 'on');

try {
    $directoryIterator = new DirectoryIterator(__DIR__);
    foreach ($directoryIterator as $dir) {kr
        if (!$dir->isDot()) {
            echo ' ' . $dir->getFilename() . '<br>';
        }
    }
} catch (Exception $e) {
    echo $e->getMessage();
}
?>


z tym kodem mam coś takiego: (IMG:https://d3higte790sj35.cloudfront.net/images/ml/sp/42fedef51b6ca9142684c53a7d26e750.png)
Wiem, że isDot usuwa tą jedną kropkę i te 2 kropki, ale jak usunąć to index.php, żeby tylko widoczne były foldery?

Z góry dziękuję za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Pyton_000
post
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


http://php.net/manual/en/directoryiterator.getextension.php
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: 9.10.2025 - 08:48