-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Fabri wrote: > Hello, would you please help me on this issue that is making me crazy? > > > > > > I start a session with session_start() and I need to write a file, the file > is written twice! If I remove session_start the code works obviously fine. > > I used the date as name of file so I can see the problem, otherwise the > file is overwritten. > > > > session_start(); > > $nome = date("Ymd-His"); > > $path = $nome . ".xml"; > > $fh = fopen($path, 'w'); > > if ($fh) { > > fwrite($fh, 'ciao'); > > fclose($fh); > > echo $path; > > } > > > > does someone have an answer? > > Yes, I believe you need to elaborate more on your objectives for the code and what exactly you mean by the file being written twice. From the code snippet above, it seems as though you are just going to overwrite a file and destroy it's contents, not write to it twice. This isn't being called from any sort of loop, is it? - -- Christopher Weldon, ZCE President & CEO Cerberus Interactive, Inc. cweldon@xxxxxxxxxxxxxxxxxx 979.739.5874 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFCGnIZxvk7JEXkbERAj4OAKCVUc3lLkx7JcbwYavK/Qc/DYKtEQCfbU9w EevaaQyHxc87B7qFwZxS0E4= =BbS2 -----END PGP SIGNATURE----- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php