PHP ftp_exec() Function
Complete PHP FTP Reference
Definition and Usage
The ftp_exec() function requests a program or command to be executed on the FTP server.
This function returns TRUE on success and FALSE on
failure.
Syntax
|
ftp_exec(ftp_connection,command)
|
| Parameter |
Description |
| ftp_connection |
Required. Specifies the FTP connection to use |
| command |
Required. Specifies the command request to send to the FTP server |
Tips and Notes
Note: Unlike the ftp_raw() function, ftp_exec() can only send commands
after it is logged in to the FTP server.
Example
<?php
$command = "ls-al > test.txt";
$conn = ftp_connect("ftp.testftp.com") or die("Could not connect");
ftp_login($conn,"admin","ert456");
if (ftp_exec($conn,$command))
{
echo "Command executed successfully";
}
else
{
echo "Execution of command failed";
}
ftp_close($conn);
?>
|
Complete PHP FTP Reference

Whether you're new to XML or already an advanced user,
the user-friendly views and powerful entry helpers,
wizards, and debuggers in XMLSpy are designed to meet your XML
and Web development needs from start to finish.
New features in Version 2010!
- XML editor
- Graphical XML Schema / DTD editors
- XSLT 1.0/2.0 editor, debugger, profiler
- XQuery editor, debugger, profiler
- XBRL validator, taxonomy editor, taxonomy wizard
- Support for Office Open XML (OOXML)
- Graphical WSDL 1.1/2.0 editor & SOAP debugger
- JSON editing & conversion
- Java, C#, C++ code generation
- And much more!
Download a free trial today!
|
|
|
|