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>";
?>
Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?This is what I've come up with. It doesn't work at all ^^;;Code: <head><?php $string = Red;function changeBlue()
How to give the privillege for triggers?
Hi,
Need help with some php code :)
Hey! I'm quite new to this whole thing, so please don't fire me with shait on this one =DI'm trying to learn PHP and MySQL, and atm I am trying to make a website which corresponds with a database - a
Multiple arrays inside data
Hi,Simple question. I have a column called "array" in my database, and inserted into each field is the following imploded array:Code: mctriangle,570.65,355.1,1,1,0It is an instance of an
Displaying an image using echo command
I had done a query on my database, one of the fields being an image reference to a directory where an image is stored. e.g "/images/picture.jpg"I want to display this image by using
Is it possible to view php source code??
Hi AllI was just wondering if it's possible to view a websites php source code? I know that php is a server side scripting language and that it is processed at the server and the results are sent
Menu restriction
How can I restrict the individual menu that would appear when a user logs in so that all users are confined to the transactions for which they have authorizations only as this also helps at a glance
Unable to customise toolbar in FCK
<FCKeditorV2:FCKeditor ID="FCKQuesreply" runat="server" ToolbarSet="MyToolbar" BasePath="~/fckeditor/" SkinPath="skins/silver/" CustomConfigurationsPath="~/fckeditor/fckconfig.js"
Is there something wrong?
Hi all,Just a quick question... can someone look at this code and see if something is wrong?Code: $j = 1;$vals = array();$feedline = array();foreach(explode($delimiter,$b) as $key => $values)
fire away
i launched about 4 months ago as a lagit co. i have 2 paying clients, 1probono, 1 side progect, and 1 chat site. all of this has led to a lot of hits but very few real clients. i just changed from a