Hi Guys,
I have a page that sorts the contents (PDFs) of a directory and displays them on the webpage chronologically from the oldest (at top) to the newest (at bottom).
I'd like to reverse this display order and have the latest files display at the top with oldest at the bottom. The code is seen below:
Thanks in advance!!!
<?php
$dir = opendir('../../files/main/group/info');
$i = 0;
// begin subdirectory processing
$subdir = "../../files/main/group/info"."/";
$cwd = opendir($subdir);
echo '<ul style="list-style: none;"><strong>';
while ($file = readdir($cwd)) {
if (($file != ".") && ($file != "..") && ($file != "README.txt")) {
$link = rawurlencode($file);
$tmp = basename($file, ".pdf");
$filename = date('F d, Y',strtotime($tmp));
echo '<li><img src="../../images/icons/pdf.gif" alt="PDF Document" /> <a href="' . $subdir, $link . '" target="_blank">' . $filename . '</a>';
}
}
echo "</strong></ul>";
?>
header redirect problems? please help
Ok i am making a site that generates youtube thumbnails and i am generating an image that displays 1 image with a playbutton image on top of ithere is the page that generates the
Log $_POST
How would i log submits on a form, by everyone? I want to then echo the number of submissions.I've tried this:Code: [Select]<?phpif (isset($_POST['submit'])) {$myFile =
How to Handle more than one submit button in single form?
HiI have one PHP file which contains one Form. In this form there are two Submit type Buttons<input type="submit" name="edit" value="save"> <input
Gerenate tabel in Php
I whant to generate a tabel takeing data from database like this one so the results to be display on 2 columns<table width="50%" border="0" cellspacing="0"
ORA-01017: invalid username/password; logon denied
Dear All,
if statements problems
Hi. I'm trying to make a web form, but I kind of hit a dead end trying to figure out why it doesn't work. Basically, I'm trying to read from a file and then populate the form according to the file.The
WHYISNT THIS MYSQL STATEMNT NOT WORKING? (php)
caps because its absolutely rediculous.i dontunderstand why its not working. there is a column called id and a collumn called to then there is also. two rows with the field for `to` equal to the
value not going in data base
hello friends.... i am having a working javascript....when i am selecting any designation and refresh/validation problem the form is resetting the designation value and the
delete comma
HI,How to delete "," at the end of the string.Code: $match = 2009/02/03/a2correx03cvbnm,echo preg_replace("/;$/", "HI", "$match");
Linking with Foreign Keys
I have been getting an erro when I try and link: