PHP Website
Overview
The PHP code for my LAMP based website. It allows comments, skinable through CSS, and easy addition of new content. Consists of only 3 pages: one to display a section(News, Blog, ...); one to display an item; and then one for adding new content. Also a small script to convert an html file into a series of echo lines, for PHP. Note that all files are named with the .html extension on the site itself, but using an Apache trick to get it to execute the PHP.
Files
- index.php -- The main page that displays a section. Retrieves a list of all items in that section and populates the menu on the left. Takes the first few items and displays their full contents on the right.
- show_item.php -- Shows the full contents of an item. Also handles addition and display of comments for that item. It will format comment spaces correctly, handle newlines, prevent interpretation of HTML code, and stop blown margins. I will eventually add a small captcha if needed
- add_item.php -- A somewhat user unfriendly page to add or update content. It also will take in a password so you can connect to the DB as a more privileged user
- styles.css -- Current style sheet for the site
- phpize -- Small Perl script that will take a file, and encapsulate each line in echo "line" It also handles \" any previous quotes in the file.
Conclusion
The site seems to work pretty well. I'm sure I'll always run across glitches, and want to add enhancements as I go along, but overall it seems decent. I plan to eventually put up a small tutorial to cover alot of the little tricks needed to get everything running.
Comments(0)
2008-04-10 17:26:31
Add your comment:
Hardware
Software
- TAIM (Alpha Version): GHCI integration with vim
- CheaTorrent -- An evil BitTorrent client
- Self Modifying 2D Turing Automata
- Competing Conway Life Automata
- X11 Timelapse Desktop Video
- Colored Wolfram Automata With Sound Input
- Pseudo Video Feedback in Processing
- Haskell Cipher Saber
- Illegal FIlenames -- Windows and *nix
- Simple Perl SDL Music Keyboard (Updated)
- Image to Spectrogram
- Pastebin Hell
- OMGWTFRNG (OWR)
- OTP Enhancement : Failure Report
- Java Network File Transfer Tool
- AES Encrypted Filesystem Speeds
- Dual Message Encryption
- PHP Website
- Mp3 Splitting Script
- Random Obfuscation Tool
- Filesystem Speed Comparisons
- Java Based Web Server GUI