i really cannot see how ob_start() would have anything to do with not being able to write to a file. are there any php errors you are getting?
also, you are overwriting $to_write at the end of your script, so its not allowing the js to be written to the file. are you doing that on purpose?
Reputation Points: 235
Solved Threads: 193
Nearly a Posting Virtuoso
Offline 1,315 posts
since Jun 2007