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
  #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
Moderator
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 7 m 51 sec
Reputation Power: 4
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"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 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 4 m 29 sec
Reputation Power: 6
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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five &quot;checkpoints&quot; for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway