I am trying to write to file on external server with php. I have the FTP details. Here is my code
$handle = fopen("ftp://USN:PASS@DOMAIN/FOLDER/FILE.HTML", "a");
fwrite($handle, "Some text");
fclose($handle);
upon execution I get "The connection was reset. The connection to the server was reset while the page was loading." error in browser. What am I doing wrong?
allow_url_fopenset as true in your php.ini or change it in execution mode with this code:ini_set("allow_url_fopen ", 1);.