Start writing to a new XML File each week, PHP -
Start writing to a new XML File each week, PHP -
i have form which, when submitted, writes inputted info xml file. form continues submitted, info appends xml file works perfect. problem need start writing new xml file each week, have ideas how accomplish this? writing in php. thinking along lines of;
date("y-m-d",strtotime("+1 week"));
i have file creation date, in isodate format need figure out how single out date section without time?
you include week number in filename. when writing check if file exists, if not create new xml file:
$filename = date('y-w').'.xml'; //2014-26.xml if (file_exists($filename)) { //append info xml file } else { //create new xml file new week }
php
Comments
Post a Comment