Greenguy's Board

Greenguy's Board (http://www.greenguysboard.com/board/index.php)
-   Programming & Scripting (http://www.greenguysboard.com/board/forumdisplay.php?f=15)
-   -   Pulling pics from dated folders, works - but how about? (http://www.greenguysboard.com/board/showthread.php?t=63789)


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
M:)Rten

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 2012-04-13 09:02 AM

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:

$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:



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

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