Generate .txt file with PHP with "til" (~) etc

-1

I am not able to generate a .txt file where the tilde and accents are printed correctly. I'm using fwrite .

code snippet:

$arquivo  = fopen('aaa.txt', 'w+');
$escrever = fwrite($arquivo, $txt);

fclose($arquivo);
    
asked by anonymous 30.10.2017 / 18:48

1 answer

0

I solved it! The problem was to switch to mysqli_set_charset ($ connection, 'iso-8859-1'); in connection with the database! Simple and basic thing that took my time.

    
31.10.2017 / 12:27