Windows コマンドラインで。
ftp コマンドでデバッグを有効にする方法、
PHP の 2 番目の質問は、デバッグ モードを有効にする方法です。
以下は単純な 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);
?>