Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

Including date in file path

$
0
0

Hey all,

 

Thanks for this great forum.  I've learned a lot.

 

What I'm trying to do is create a php script that will select a folder based on the date.  For example, this is the original code:

$file = '/var/www/html/public_html/svsshc/'.$_REQUEST['id'].'.png';

the folder the .png files will be in, for example, is:

/var/www/html/public_html/svsshc/2014-01-07

I tried doing this but it did not work properly:

$file = '/var/www/html/public_html/svsshc/'$_date'/'.$_REQUEST['id'].'.png';

I apparently don't have a very good grasp on how the php date function works.  Any suggestions on what to do?

 

Thank you!


Viewing all articles
Browse latest Browse all 13200

Latest Images

Trending Articles



Latest Images