Autor Zpráva
fuckin
Profil
Mam problem s vypisem adresaru v zadane slozce. Kdy chci vypsat slozky na aktualni adresa tak to funguje
function getPlugins()
{
    //define the path as relative
    $path = "./"; 

    //using the opendir function
    $dir_handle = @opendir($path) or die("Unable to open $path");

    //running the while loop
    while ($file = readdir($dir_handle)) {
        if ($file != "." && $file != "..") {
            if (is_dir($file)) {
                $dir[] = $file;
            }
        }
    }
    @sort($dir);
    
    //closing the directory
    closedir($dir_handle);
    return $dir;
}


var_dump(getPlugins());



S timto to funguje
$path = "./";


Kdyz tam ale dam
$path = "./plugins/";


Tak me to vyhodi NULL ikdyz v te slozce jsou slozky !
Alphard
Profil
Funkci is_dir() musíte dát nejen jméno souboru, ale i cestu k němu.
fuckin
Profil
:)...pekne blba chyba...diky
Toto téma je uzamčeno. Odpověď nelze zaslat.

0