Overwrite a file with the content of a textarea

I got answer to that question in the wordpress-support-forum:
https://wordpress.org/support/topic/overwrite-a-file-with-the-context-of-a-textarea/

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)