Czy jest jakiś skrtyp w php który wyświetlał by wszystkie pliki txt znajdujące się w podamym folderze??
i czy da się za jego pomocą stworzyć tabele w której wyświetlone były by te pliki wraz z zmiennymi w nich zamieszczonymi?
<?php if ($file != "." && $file != "..") { include("newsy/$file"); } } } ?>
<?php function listImages($dirname, $sortby, $sortdir) { for($i=0;$i<sizeof($ext);$i++){ //Some formats may contain no image or may contain multiple images. //In these cases, getimagesize() might not be able to properly determine the image size. //getimagesize() will return zero for width and height in these cases. if($imgdata[0] && $imgdata[1] && $filesize){ "name" => $file, "width" => $imgdata[0], "height" => $imgdata[1], "size" => $filesize ); } } } } } //obtain an array of columns foreach ($files as $key => $row) { $name[$key] = $row['name']; $width[$key] = $row['width']; $height[$key] = $row['height']; $size[$key] = $row['size']; } } //end listImages //start test $sortby = "width"; // sort-by column; accepted values: name OR width OR height OR size $path = "path"; // path to folder $sortdir = SORT_ASC; // sorting order flags; accepted values: SORT_ASC or SORT_DESC $files = listImages($path, $sortby, $sortdir); foreach ($files as $file){ echo 'name = <strong>' . $file['name'] . '</strong> width = <strong>' . $file['width'] . '</strong> height = <strong>' . $file['height'] . '</strong> size = <strong>' . $file['size'] . '</strong><br />'; } //end test ?>
<?php if ($file != "." && $file != "..") { include("newsy/$file"); } } } ?>
<?php "name" => $file, "width" => $imgdata[0], "height" => $imgdata[1], "size" => $filesize ); ?>
<?php //start test $sortby = "width"; // sort-by column; accepted values: name OR width OR height OR size $path = "path"; // path to folder $sortdir = SORT_ASC; // sorting order flags; accepted values: SORT_ASC or SORT_DESC ?>
<?php //listImages(string path, string sort-by name | width | height | size, int sorting order flags SORT_ASC | SORT_DESC) function listImages($dirname, $sortby, $sortdir) { for($i=0;$i<sizeof($ext);$i++){ //Some formats may contain no image or may contain multiple images. //In these cases, getimagesize() might not be able to properly determine the image size. //getimagesize() will return zero for width and height in these cases. if($imgdata[0] && $imgdata[1] && $filesize){ "name" => $file, "width" => $imgdata[0], "height" => $imgdata[1], "size" => $filesize ); } } } } } //obtain an array of columns foreach ($files as $key => $row) { $name[$key] = $row['name']; $width[$key] = $row['width']; $height[$key] = $row['height']; $size[$key] = $row['size']; } } //end listImages //start test $sortby = "width"; // sort-by column; accepted values: name OR width OR height OR size $path = "path"; // path to folder $sortdir = SORT_ASC; // sorting order flags; accepted values: SORT_ASC or SORT_DESC $files = listImages($path, $sortby, $sortdir); foreach ($files as $file){ echo 'name = <strong>' . $file['name'] . '</strong> width = <strong>' . $file['width'] . '</strong> height = <strong>' . $file['height'] . '</strong> size = <strong>' . $file['size'] . '</strong><br />'; } //end test ?>