ftp_quit()

Its an alias ftp_close() and  closes ftp conection

Example

<?php

$ftpId = ftp_connect(‘ftp.phpcodez.com’);

$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);

echo ftp_pwd($ftpId)

ftp_quit($ftpId);

?>