I didn't see anything right off of the bat. You may want to output the text both ways and then compare them using http://us3.php.net/manual/en/function.strcmp.php
-------- apart from the fact that the slashes are there in one, and not in the other, there is no difference... $fp = fopen($newFile, "wb"); $bytes = fwrite( $fp, $text ); print $bytes." written"; fclose( $fp ); ... tells me that 5287 bytes were written, and my file shows the full text... $fp = fopen($newFile, "wb"); $bytes = fwrite( $fp, $newContent ); print " - ".$bytes." written"; fclose( $fp ); ... tells me that 5520 bytes were written, but opening the file shows that half the text is missing... the number of bytes wrtten seems to be correct. if i run a strlen() against each string, then i get the same length as bytes, so that sounds about right... but the files just aren't right. everything would point to the fact that everything is happening correctly... but it just isn't... i really can't get my head around this one at all. could it possibly be a windows issue??? i know windows can be an arse in dealing with files, but i can't see how it could pick up on a variable inside PHP and truncate it? obviously there's no simple solution here... can anyone point me in the way of an alternative way of doing this? i could try the file write in 3 stages, first part of content, text, end of content, as they seem to write fine seperatly. arse... thanks loads for your help so far tho jay... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php