Jump to content

Doesn't write to file?


3raser

Recommended Posts

When you set your file pointer

$fp = fopen('text.txt','w');

 

That w at the end means.. Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.

You want a... Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

 

This can all be found in the manual under fopen

When you set your file pointer

$fp = fopen('text.txt','w');

 

That w at the end means.. Open for writing only; place the file pointer at the beginning of the file and truncate the file to zero length. If the file does not exist, attempt to create it.

You want a... Open for writing only; place the file pointer at the end of the file. If the file does not exist, attempt to create it.

 

This can all be found in the manual under fopen

 

Was a bit confusing......

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.