Trying to create a value to store filename according to date
Posted: Fri May 15, 2009 10:19 am
Some help for a beginner in php?
I'm trying to get a file name of an automatically created zip and store that name according to the date as a value to work with it. Heres what I have...
It will print the correct filename according to the date as a result
e.g. S407105132009-05142009.zip
But I need to built an unzip function with this script to unzip that file after getting the filename.
How can I make a value $filename from the result of that?
I'm trying to get a file name of an automatically created zip and store that name according to the date as a value to work with it. Heres what I have...
Code: Select all
<?php
$store = 4071;
$today = date("md20y");
echo "Today is ",$today, "<br />";
$tomorrow = mktime(0, 0, 0, date("m"), date("d")+1, date("y"));
echo "Tomorrow is ".date("md20y", $tomorrow),"<br />";
$yesterday = mktime(0, 0, 0, date("m"), date("d")-1, date("y"));
echo "Yesterday was ".date("md20y", $yesterday),"<br />";
echo "Your store number is ",$store, "<br />";
echo "Your store's filename will be S", $store,"".date("md20y", $yesterday), "-", $today, ".zip";
?>
e.g. S407105132009-05142009.zip
But I need to built an unzip function with this script to unzip that file after getting the filename.
How can I make a value $filename from the result of that?