在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);
?>
最佳答案
在终端中运行php脚本,以获得逐步脚本执行跟踪,使用:
/usr/local/php/bin/php filename.php
=)