Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-04-2003, 11:20 AM   #1 (permalink)
bdl
Senior Contributor
 
Join Date: May 2002
Location: vta.ca.usa
Posts: 555
bdl is on a distinguished road
date related problem

I've got a server that automatically stores images in a directory like so:

2003/09/04/12/15/

So you have obviously the date string with each component as a seperate directory. The application that takes snapshots and stores images like this has no other method of doing so, AFAIK. The task would be to create dynamic links for the year, month, day, and then ultimately the time. So it might look like this on the page:


2003
-- Sept
-- 4
-- 12:15


With each link having a hierarchy to get back to the starting point. This is something I've not come across before, would appreciate any ideas. TIA.
bdl is offline   Reply With Quote
Old 09-04-2003, 12:19 PM   #2 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
yikes, that is ugly.

if you are in the main directory i assume that there would be 2000, 2001, 2002, 2003?

can you read the directory's in your current directory and print them up first?

then, chdir into 2003 (or whatever they picked) and read that directory in and print up its results (changing 1 for january, 2 for feb. etc).

then do it for days

and then times?

and do some sort of PWD (dont know the PHP command) to get your current directoy and break apart that string using / and then print up the appropriate links back to the other directories....

hmmm.... sounds like fun
__________________


Urban Clothing
Admin is offline   Reply With Quote
Old 09-04-2003, 12:25 PM   #3 (permalink)
Admin
$_['Your_Mom'];
 
Admin's Avatar
 
Join Date: May 2002
Location: Santee
Posts: 627
Admin is on a distinguished road
getcwd();

that should return your current directory.
__________________


Urban Clothing
Admin is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adjusting date() function for time zones Epsilon PHP 1 02-27-2004 02:55 AM
Web Design Problem elusionsdesign HTML, XML, Javascript, AJAX 2 11-09-2003 07:01 PM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 04:44 PM
This is a windows/C problem UnderWing Standard C, C++ 6 03-28-2003 06:17 AM


All times are GMT -8. The time now is 04:26 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting