problem with ftp_put and ftp_get

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    problem with ftp_put and ftp_get

    I'm trying to make simple ftp client, used the following article for base:


    All works, I can login, see list of files, but except ftp_put and ftp_get
    functions. They return always false. I tried to set passive mode, it doesn't
    help.

    Any advice will be appreciated.


  • Steve

    #2
    Re: problem with ftp_put and ftp_get

    [color=blue]
    > All works, I can login, see list of files, but except ftp_put and ftp_get
    > functions. They return always false. I tried to set passive mode, it doesn't
    > help.[/color]

    Code? Have you tried removing the "@" error-suppressing character from
    the function calls and letting PHP tell you it thinks the problem is?

    ---
    Steve

    Comment

    • Alex

      #3
      Re: problem with ftp_put and ftp_get

      I tried, but it doesn't work, echo gives nothing.

      $putFile = ftp_put($conn, $remotefile, $localfile, FTP_BINARY);

      echo $putFile;

      "Steve" <googlespam@nas tysoft.com> wrote in message
      news:1133803303 .919070.264430@ g14g2000cwa.goo glegroups.com.. .[color=blue]
      >[color=green]
      >> All works, I can login, see list of files, but except ftp_put and ftp_get
      >> functions. They return always false. I tried to set passive mode, it
      >> doesn't
      >> help.[/color]
      >
      > Code? Have you tried removing the "@" error-suppressing character from
      > the function calls and letting PHP tell you it thinks the problem is?
      >
      > ---
      > Steve
      >[/color]


      Comment

      • Steve

        #4
        Re: problem with ftp_put and ftp_get

        [color=blue][color=green]
        > > Code? Have you tried removing the "@" error-suppressing character from
        > > the function calls and letting PHP tell you it thinks the problem is?[/color][/color]
        [color=blue]
        > I tried, but it doesn't work, echo gives nothing.[/color]

        Odd. Have you enabled error reporting and display?

        ini_set('error_ reporting', E_ALL);
        ini_set('displa y_errors', TRUE);


        ---
        Steve

        Comment

        • Alex

          #5
          Re: problem with ftp_put and ftp_get

          insert it, same result

          "Steve" <googlespam@nas tysoft.com> wrote in message
          news:1133821942 .509141.135330@ o13g2000cwo.goo glegroups.com.. .[color=blue]
          >[color=green][color=darkred]
          >> > Code? Have you tried removing the "@" error-suppressing character from
          >> > the function calls and letting PHP tell you it thinks the problem is?[/color][/color]
          >[color=green]
          >> I tried, but it doesn't work, echo gives nothing.[/color]
          >
          > Odd. Have you enabled error reporting and display?
          >
          > ini_set('error_ reporting', E_ALL);
          > ini_set('displa y_errors', TRUE);
          >
          >
          > ---
          > Steve
          >[/color]


          Comment

          • George

            #6
            Re: problem with ftp_put and ftp_get

            I had some issues when I was working on an FTP program for a client of
            mine as well. I switched it around and used ftp_fput, which works with
            an open file stream, and that seemed to clear up my issues. The main
            thing was to open the file first, then upload it.



            Comment

            Working...