nie dawno zaczolem uczyc sie php i napisalem maly scrypt do wyswietlania zawartosci katalogow
<? include \"cfg.php\"; echo\"<body >\"; function getfilesize($bytes) { if ($bytes >= 1099511627776) { $suffix = \"TB\"; } elseif ($bytes >= 1073741824) { $suffix = \"GB\"; } elseif ($bytes >= 1048576) { $suffix = \"MB\"; } elseif ($bytes >= 1024) { $suffix = \"KB\"; } else { $return = $bytes; $suffix = \"Byte\"; } if ($return == 1) { $return .= \" \" . $suffix; } else { $return .= \" \" . $suffix . \"s\"; } return $return; } if ($_GET[\"path\"]==\"\") { $path = \"./pliki\"; } else { $path=$_GET[\"path\"]; } echo \"<tr><th></th><th align=left>Nazwa</th><th align=right>Wielkosc</th><th align=right>Data</th></tr>\"; if ($file != \".\" && $file != \"..\") { echo \"<tr><td><img src=./gfx/folder.ico /></td><td><a href=files.php?path=$path/$file>$file</a></td><td align=right></td><td align=right> $czas</td> </tr>\"; }else{ echo \"<tr><td><img src=./gfx/file.ico /></td><td><a href=$path/$file>$file</a></td><td align=right>$wielkosc</td><td align=right> $czas</td> </tr>\"; } } } } ?>
i mam taki problem
jesli plik zawiera spacje w nazwie to do zmiennej zapisana zostaje nie cala nazwa pliku
tzn do pierwszej spacji
mozecie mi podpowiedziec jak zrobic by wyswietlalo nazwy ze spacjami ?
szukalem na forum ale sie nie doszukalem
