在 Windows 命令行中。
如何在 ftp 命令中启用调试,
PHP中的第二个问题如何启用调试模式,
下面是简单的 ftp 脚本,
如何获取 FTP 的逐步脚本执行跟踪。
我猜php中有调试模式,请告知该模式,
<?php
$file = 'somefile.txt';
$remote_file = 'readme.txt';
// set up basic connection
$conn_id = ftp_connect($ftp_server);
// login with username and password
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// upload a file
if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) {
echo "successfully uploaded $file\n";
} else {
echo "There was a problem while uploading $file\n";
}
// close the connection
ftp_close($conn_id);
?>