Hey HXFers! How are you today? Nice weather, is it not?
Anyhow, I am remaking a nonprofit youth related website and this time around I am using a flat file based CMS.. makes it easier for me and the person who will be using the backend updater.
So, that said, the guy who will be using the CMS will be using an uploader function to upload .PDF files to the website. The PDF files will be for various things, but mostly just to donators and supporters updates of what's going on.
SO, I need some help on this part of the race.
The code I'm using to show the contents of the folder the PDF files are in is this:
So I need to do two things with this that aren't currently working.PHP Code:<?php
if ($handle = opendir('../updates/')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
echo "<div align=\"center\"> <a target=\"devotions\" href=\"".$file."\">".$file."</a></div><br />";
}
}
closedir($handle);
}
?>
1. I want to have it so when the PHP uses the echo function to display the files, it does not show the file extention (i.e. 03.21.2011.PDF, I want the .PDF to remain hidden). How do I do this, or is it possible? I know I need to change the ".$file.", but I don't know what I need to change it to.
2. In all pages for the flat editor the man running the CMS can edit the pages.. Right now it looks like when you open a .html file in Notepad, you see all the HTML and no formatting options are avaliable.
I'm wondering if someone can give me a code for the text boxes that will put formatting buttons (B will add <b></b> tags, U will add <u></u> tags).. I'd really appreciate that!
Now I don't know how hard these things are, but I would VERY much appreciate it if someone could help me out! Even if you know how to do one thing, It would help for you to post that too!
Thanks in advance!,
Daniel





Reply With Quote




I code mainly HTML and CSS, and that's it really. More of a web designer to be honest 