Re: session_start() and fopen

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/13/06, Fabri <fabrilib@xxxxxxxx> wrote:
Hello, would you please help me on this issue that is making me crazy?

I'll try


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.

This has never happened to me, ever.


I used  the date as name of file so I can see the problem, otherwise the
file is overwritten.

What exactly are you trying to do?




session_start();
$nome = date("Ymd-His");
$path = $nome . ".xml";

$fh = fopen($path, 'w');
if ($fh) {
    fwrite($fh, 'ciao');
    fclose($fh);
    echo $path;
}

for full reporting you might want to do something when the condition
of if($fh) is false


does someone have an answer?

I'm not sure what else to tell you.


Curt.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux