I cannot write with fputs.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
EDUARD59
Forum Newbie
Posts: 3
Joined: Wed Oct 14, 2009 9:22 am

I cannot write with fputs.

Post 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);
Post Reply