Creating a file to be downloaded from server.
Posted: 2022-05-06 16:45
Hi, I have an Appgini app that is Is working quite nice and now I need to get some data out of the environment to work safe.
I need to make some “digging†into a DB, then to send that outcome of that to a txt or json to a txt file in the server that will be pulled with an another app.
Im more on the C# developing side and learning the APPGINI+/php/mysq ways and really enjoying it. Here is what I have in php
$sqlData = "SELECT * FROM Usuario INTO OUTFILE 'myoutput.txt'"; //ceate query
$resultData = $conn->query($sqlData); //créate the query execution
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); //create file
fwrite($myfile, $resultData); //write result of data gather
fclose($myfile); // close
this is not working. Any tip?
A3
I need to make some “digging†into a DB, then to send that outcome of that to a txt or json to a txt file in the server that will be pulled with an another app.
Im more on the C# developing side and learning the APPGINI+/php/mysq ways and really enjoying it. Here is what I have in php
$sqlData = "SELECT * FROM Usuario INTO OUTFILE 'myoutput.txt'"; //ceate query
$resultData = $conn->query($sqlData); //créate the query execution
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!"); //create file
fwrite($myfile, $resultData); //write result of data gather
fclose($myfile); // close
this is not working. Any tip?
A3