Jump to content

More FTP issues


rhyspaterson

Recommended Posts

Hey guys,

 

Just having some issues with my basic FTP script (again). I had to move the script to a new webserver which runs the last version of PHP5.

 

The code was created and tested using PHP4. And all was good. However on the new server i can seem to get ftp_put to work for me.

 

// upload the file
      $upload = ftp_put($conn_id, $destination_file, $file, FTP_BINARY);

      // check upload status
      if (!$upload) {
          echo "<br />FTP upload of has failed!<br />";
          exit();

// if upload worked, delete the folder off the local webhost
      } else {
          echo "<p>Uploading Complete!</p><br /><br />";
	  recursive_remove_directory($directory, $empty=FALSE);
      }

 

The code fails at the f (!$upload) statement obviously. This is strange because i can create a connection, AND create a directory on the remote host. But i just cant send the file. The $file and $destination_file variables are all correct. I literally just went from PHP4 to PHP5 and it stopped working. Any suggestions?

 

Cheers,

/Rhys

Link to comment
https://forums.phpfreaks.com/topic/52926-more-ftp-issues/
Share on other sites

  • 2 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.