Autor | Zpráva | ||
---|---|---|---|
fuckin Profil |
#1 · Zasláno: 3. 8. 2009, 10:58:47 · Upravil/a: fuckin
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 |
#2 · Zasláno: 3. 8. 2009, 11:03:18
Funkci is_dir() musíte dát nejen jméno souboru, ale i cestu k němu.
|
||
fuckin Profil |
#3 · Zasláno: 3. 8. 2009, 11:06:28
:)...pekne blba chyba...diky
|
||
Časová prodleva: 15 let
|
Toto téma je uzamčeno. Odpověď nelze zaslat.
0