-1
 $backuparray = implode("|",$songarray1);
 file_put_contents("backups/".microtime("tunes.txt"),$backuparray);

How do I get my backup directory to link a txt file using microtime , owner id , premissions , and size? The file needs to have tunes.txt at the end of the microtime

  • not clear what you asking –  Nov 15 '15 at 23:52
  • I have to a show a backup directory on a page, I have the files showing up using the code provided, but I just need the files to show as a text file, and show the corresponding Owner ID, Permissions and size of the file. – Ash Jackson Nov 16 '15 at 00:03

1 Answers1

0
$dir = "/var/html/uploads";
if (is_dir($dir)) {
echo("<table border='1' width='100%'>\n");
echo("<tr><th>Filename</th><th>File Size</th>
<th>File Type</th></tr>\n");
$dirEntries = scandir($dir);
foreach ($dirEntries as $entry) {
    $entryFullName = ($dir . "/" . $entry);
     echo("<tr><td>" . htmlentities($entry) . "</td><td>".
     filesize($entryFullName) . "</td><td>" .
     filetype($entryFullName) . "</td></tr>\n");
}
 echo("</table>\n");
}
else
echo("<p>The directory " . htmlentities($dir) . " does not
exist.</p>");