Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $files = scandir(getcwd());
- foreach($files as $file) {
- if ($file == 'index.php' or $file == '..' or $file == '.') {
- } else {
- $curl_size = round((filesize($file) / 1024), 1);
- $curl_name = basename($file);
- echo '<table border="1">';
- echo '<th>Filename</th><th>Extension</th><th>Size</th>';
- echo '<tr>';
- echo "<td><a href='" . $file . "'>" . $curl_name . "</a></td>";
- echo "<td><a href='" . $file . "'>." . pathinfo($file, PATHINFO_EXTENSION) . "</a></td>";
- echo "<td><a href='" . $file . "'>" . $curl_size . " kB</a></td></tr>";
- echo '</table>';
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment