php code to save file with current date and time

Dear friends,

I want to get user information with php code. so i use this code.but my problem is the “textfile.txt” is always over write and it is not randomly save…so i want to add current time to my result file…

ex: “textfile.txt” to
“2011/03/20 07:16:17.txt”

or random name…

ex: “textfile.txt” to


system(‘getmac >textfile.txt’);


How to fix my problem?
plz give me a some successful php code…

I am Junior to the PHP :’(

I’m pretty sure that > truncates the file. You can append if you use >>

yes it is working…thanks for your help dear friend…have a nice day!!!

Sponsor our Newsletter | Privacy Policy | Terms of Service