session_start() and fopen

From: Date: Wed, 13 Sep 2006 18:31:31 +0000
Subject: session_start() and fopen
Groups: php.general 
Request: Send a blank email to php-general+get-241754@lists.php.net to get a copy of this message
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?

« previous php.general (#241754) next »