1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Failure to correctly implement ftp_nlist in php

Discussão em 'Outras Linguagens' iniciado por mostafa akrami, Novembro 9, 2024 às 18:42.

  1. I use the ftp_nlist command to check if the folder doesn't exist, then create it with the ftp_mkdir command.

    But the problem that is there and has recently been created for me is that sometimes ftp_nlist returns a false value, which causes the ftp_mkdir command to encounter an error.

    And what is more surprising is that in the next attempt, sometimes the ftp_nlist command that I try returns the existing array, which is correct and expected.

    This problem happened to me recently and it was not a problem before.

    Please guide me if anyone knows. thanks

    if(!ftp_nlist($ftp_conn , 'public_html/images')) {
    ftp_mkdir($ftp_conn, 'public_html/images');
    }

    Continue reading...

Compartilhe esta Página