I'm having trouble saving my data to a .txt on my FTP server.
Locally I got it quiet. Below is the code I am using locally:
$arquivo = 'msg.txt';
$criar = fopen($arquivo, "a+");
$conteudo = "$nome; $idade; $sexo; $telefone;".PHP_EOL ;
$escrever = fwrite($criar, $conteudo);
But I need to write to a .txt that is on my FTP server.
I have already seen that indicating the path of the file with HTTP will not work, but I did not find a solution of how I should link to the FTP server.
The code I am using to try to make online communication with .txt is the same, it only changes one line, which is the file path.
$arquivo = 'www.domain.net/pasta/arquivo.txt';
The following error message is displayed (with HTTP):
failed to open stream: HTTP wrapper does not support writeable connections