Page 1 of 1

I cannot write with fputs.

Posted: Wed Oct 14, 2009 9:33 am
by EDUARD59
I cannot write to a file with the fputs function.
I can read to the same file with fgets but I cannot write to the same file with fputs.
The code is the following:
$valor="Hello";
$fichero=fopen("trafico.txt","w");
fputs($fichero,$valor);
fclose($fichero);