Is it okay if I don't code '$ftp->close();' when uploading a file using the FTP protocol in the FTP class?I would appreciate any advice on how to deal with any problems.
I want to upload a file using the FTP protocol in the FTP class.
Set the setting file as below,
I think, need to Code according to the following procedurein a function that uploads multiple.
Specifications that repeat processing for each file.
[Problem]Test result: I can disconnect with '''$ftp->close();''', but the process does not end there, and the process of disconnecting again at the end of the function runs, resulting in an error.
Value at the time of disconnection processing
'$ftp->close();' -> _conn_id:resource id='12' type='FTP Buffer’
When disconnecting again at the end of the function -> _conn_id:resource id='12' type='Unknown'
In addition, when I tested without adding '''$ftp->close();''' no error occurred and the process was as expected.
What to do if it's not a bug？
Thank you for your reply.I was connecting and disconnecting every time I uploaded a file.I will try according to your advice and I will report later
It looks like you're new here. If you want to get involved, click one of these buttons!