Add these lines to the file /etc/phpmyadmin/config.inc.php [ubuntu]
$cfg[‘Servers’][$i][‘controluser’] = ‘root’;
$cfg[‘Servers’][$i][‘controlpass’] = ”;
Add these lines to the file /etc/phpmyadmin/config.inc.php [ubuntu]
$cfg[‘Servers’][$i][‘controluser’] = ‘root’;
$cfg[‘Servers’][$i][‘controlpass’] = ”;
It returns the system type identifier of the remote FTP server
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
echo $type = ftp_systype($ftp) or die(“Failed”);
ftp_quit($ftpId);
?>
It opens an Secure SSL-FTP connection
Example
<?php
$ftpId = ftp_ssl_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_size($ftpId, “test”) or die(“Failed”);
ftp_quit($ftpId);
?>
It returns the size of the given file
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_size($ftpId, “test”) or die(“Failed”);
ftp_quit($ftpId);
?>
It sends a SITE command to the server
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_site($ftpId, ‘CHMOD 0775 /home/user/test -R’) or die(“Failed”);
ftp_quit($ftpId);
?>
It sets miscellaneous runtime FTP options
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_set_option($ftpId, FTP_TIMEOUT_SEC, 10);
ftp_quit($ftpId);
?>
It removes a directory on the FTP server
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_rmdir($ftpId, “test”) or die(“Failed”);
ftp_quit($ftpId);
?>
It renames a file or a directory on the FTP server
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
ftp_rename($ftpId, $oFile, $nFile) or die(“Failed”);
ftp_quit($ftpId);
?>
It returns a detailed list of files in the given directory
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
$login = ftp_login($ftpId, ‘anonymous’, ‘user@phpcodez.com’);
$result = ftp_rawlist($ftpId, ‘/’);
ftp_quit($ftpId);
echo “<pre>”;print_r($result);
?>
It sends an arbitrary command to an FTP server
Example
<?php
$ftpId = ftp_connect(‘ftp.phpcodez.com’);
ftp_raw($ftpId, “USER user”);
ftp_raw($ftpId, “PASS pass”);
ftp_quit($ftpId);
?>