Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2012-04-13, 09:02 AM   #1
jollyhumper
That's what she said
 
jollyhumper's Avatar
 
Join Date: Feb 2012
Location: Norway
Posts: 2,495
Send a message via ICQ to jollyhumper
Pulling pics from dated folders, works - but how about?

Hi guys and else..

I have this code. It works fine.
First snippet "defines" the rule. Next snippet are put into "for instance" the various tables that builds up the site.


Code:
<?php
$date = date('Y-m-d');
if(!is_dir("gallery/".$date)){$date="default";}
function fcheck($name){
if(@file_exists("gallery/".$date."/".$name)){
return "gallery/".$date."/".$name;
}else{
return "gallery/".$date."/".$name;
}}

?>
Here's the short snipppet that adds "todays" pictures

Code:
<td align="center"><a href="xpic01.php"><img src="gallery/<?php echo $datetoday; ?>/001.jpg"></a></td>
Still works. I *EVEN* have a fallback-routine, so if nothing is found within a gallery it falls back to one which has something in it.

OK; HERE COMES THE QUESTION
I am not good at PHP.
What if I want each dated folder to include a textfile where PHP reads and publish on appropriate placement on webpage?

Hope I ask a understandable question.

cheers
MRten

PS, according my User-status-name-title
"Rock stars ... is there anything they don't know?"
No, we know everything. Absolutely. Except this about reading a text and put it into a html/php page.
jollyhumper is online now   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 01:52 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc