Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 18th, 2007, 09:40 AM
jimmyjack jimmyjack is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Nov 2007
Posts: 1 jimmyjack User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy Content management... I think

Hello everybody, I'm pretty new to both php scripting and web development in general so bare with me for a second

Okay, so here is my problem: I have a website, which does not give me access to sql databases (its a free site). So what I've decided to do is create various directories on the server and place all my articles that i write in those directories. Then, when a user opens up the main page of my site I use a php script to:

a) Get all the directories that I've created.
b) Get all the files in all those directories.

I'm using the glob() function for this (by the way, if I'm busy doing something incredibly stupid here, please, by all means tell me)

c) Get the dates of when all the files were last edited and use it to determine what the latest article is, subsequently placing a brief description of it on the main page.

Now, Is this the correct way to go about doing this? or should I rather use some kind of manually updated reference for my site, so that I would rather tell my site which article i wrote last instead of it having to find that out for itself.

anyway thanks for the help, please dont persecute me too much if what i suggested here is ludicrous, I started web development three days ago and I have no idea what I'm doing

Thanks again, Cheers.

Reply With Quote
  #2  
Old November 26th, 2007, 08:32 PM
nawlej nawlej is offline
Contributing User
Codewalkers Regular (2000 - 2499 posts)
 
Join Date: Apr 2007
Location: Dallas, Tx. USA
Posts: 2,008 nawlej User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 8 m 12 sec
Reputation Power: 5
You can "database" all of your articles with a flat file system. It's less overhead to just read and parse the file then it is to do all of that directory listing and parsing.
__________________
Errors have been made. Others will be blamed.
Group Member, Dallas PHP Users Group &lt;b&gt;(DPUG)&lt;/b&gt;
--... ...--, Eric

Reply With Quote
  #3  
Old December 1st, 2007, 07:30 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Click here for more information.
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,775 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 13 h 47 m 18 sec
Reputation Power: 7
and there is always SQLite - check it out for more info

other then that - for a small site to me it what you are thinking is doable thought it will see "problems" the more it grows (calling stat on 10 files vice 1000 files for example)

Oh and rather then use glob (I personally don't like to directly send commands to the server command line with PHP) - I would recommend using the DirectoryIterator in the SPL (Standard PHP Library) if you are using PHP5. it is sweet and clean. for a tutorial on how to use it see http://www.phpro.org/tutorials/Intr...n-to-SPL.html#3
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > Content management... I think


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek