|
Home
iRate! IceMelon IM Tutorials Headlines CoolSites PHP Functions |
|
Most Referenced Functions » google_pagerank() » preg_replace() » imagecreatefrompng() » site_pageranks() » imagepng() » imagedestroy() » imagestring() » imagecolorallocate() » htmlentities() » preg_match() » fopen() » header() » getimagesize() » preg_match_all() » session_start() » htmlspecialchars() » ob_start() » ob_flush() » strstr() » flush() » strpos() » setcookie() » str_replace() » array2vars() » nl2br() » preg_split() » ereg() » ereg_replace() » urlencode() » readgzfile() Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m. |
PHP Functions
Function: ftp_exec (PHP 4 >= 4.0.3, PHP 5) ftp_exec -- Requests execution of a program on the FTP serverDescriptionbool ftp_exec ( resource ftp_stream, string command )Sends a SITE EXEC command request to the FTP server. Parameters
ftp_stream The link identifier of the FTP connection. commandThe command to execute. Return ValuesReturns TRUE if the command was successful (server sent response code: 200 ); otherwise returns FALSE . Examples
Example 1. ftp_exec() example
<?php
$command = 'ls -al >files.txt';
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
if (ftp_exec($conn_id, $command)) {
echo "$command executed successfully<br />\n";
} else {
echo 'could not execute ' . $command;
}
?>
Related Function(s) |