|
|
|
|
![]() ![]() |
May 18 2008, 06:51 PM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 395 Joined: 8-January 08 From: UK - Kent Member No.: 55,950 |
Kobra500's PHP Project This is the Official Post for My Project to Learn PHP. Below is the list of things I will do... [okay, attempt] Thanks to KansukeKojima and Jlhaslip QUOTE * * Parse a variable. * Build a random page title chooser.... * Build a template in php and parse it AROUND the content of a page. * Create a flat file shoutbox. * Create a shoutbox with a database. * Read the list of files in a directory * List the images from that list * Display those images as thumbnails with links to a full size image * Read a file of content for a Template system and parse the H2 tags to create the Page title for the page. * Build a Spam-proof Contact form with a captcha system if you have any additional things to add to this list just post here anyway wish me luck!!! I will be posting links and crossing off things, so please feel free to bookmark this post or watch for it in the recent activity area! edit: you can now view the changes at my blog so this post will no longer be updated. This post has been edited by kobra500: May 23 2008, 08:32 PM |
|
|
|
May 19 2008, 01:27 AM
Post
#2
|
|
|
Desperately seeking "any key" to continue... ![]() Group: Admin Posts: 3,438 Joined: 23-April 05 From: Trap17 storage box Member No.: 6,042 |
Reading directory and listing them:
HTML $path = "directory/path"; $narray=array(); $dir_handle = @opendir($path) or die("Unable to open $path please notify the administrator. Thank you."); $i=0; while($file = readdir($dir_handle)) { if($file != '.' && $file != '..') { $narray[$i]=$file; $i++; } } //closing the directory closedir($dir_handle); I hope this helps...unless you weren't looking for help. Once a directory is read and stored into an array, you can execute various ways to spit back out. You can use PRINT or ECHO command to list files or pictures. Sorting file names as in order of Weekdays was the most challenging one. Vujsa worked out the best and shortest code to arrange them as in order of weekdays rather than alphabetically. Search the forum |
|
|
|
May 22 2008, 08:16 PM
Post
#3
|
|
|
Member [Level 1] ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 66 Joined: 2-April 08 From: Berkshire, England Member No.: 60,270 |
Good luck!
For my first PHP script I made an email form+sender, ever since then all I want to do is PHP! For my second one, the one I am on at the moment, I am trying to make a member system (allowing the user to register, login, change password & settings etc..) i'm nearly there, just adding some design to it! look if you like: http://sam.exofire.net/register.php. It's great when you spend ages on sorting out the errors in your script and then it finally works and you can try it out - best part of it by far, its even more of a great feeling when you make the script yourself - not just searching source forge or something Good luck anyway... |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 26th July 2008 - 03:31 PM |