I am trying to create a TXT file with PHP. This works fine. Unfortunately, it seems that I do not have the correct syntax, because there is no content inserted using the file_put_contents
function to put the data from my SQLite table into the TXT file.
<?php
$db = new SQLite3('sshTunnel.sqlite');
$results = $db->query('SELECT * FROM mydata');
$file = 'D:\test.txt';
file_put_contents($file, $results);
?>
The file is written, but it contains 0 Bytes
.