Delete All Folders and Files from FTP using PHP


<?php set_time_limit(250); // Configuration $path            =    ’/folder1/delete’; $ftp_server        =    ’’; $ftp_user_name    =    ’’; $ftp_user_pass    =    ’1234567′;

// set up a connection to ftp server $conn_id         =     ftp_connect( $ftp_server );

// login with username and password $login_result     =     ftp_login( $conn_id, $ftp_user_name, $ftp_user_pass ); echo “<div class=’base’><strong>Base Folder : </strong>”.$path.” is deleted</div>”;

// Call to delete all directory and Files from given FTP delete_ftp_files( $conn_id, $path );


4 comments on “Delete All Folders and Files from FTP using PHP

  1. Excellent post. I used to be checking continuously this blog and I’m impressed! Very helpful info specially the remaining part 🙂 I deal with such info a lot. I used to be looking for this particular info for a very long time. Thank you and good luck.

  2. You really make it appear really easy together with your presentation however I to find this topic to be actually one thing that I feel I’d by no means understand. It kind of feels too complex and very huge for me. I’m having a look ahead to your next submit, I’ll try to get the cling of it!

  3. Wow, awesome blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your
    web site is fantastic, let alone the content!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s