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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

c# - Create a Notification Object (Email or Page) At Run Time -- Dependency Injection or Factory -

Set Up Of Common Name Of SSL Certificate To Protect Plesk Panel -