简体   繁体   English

Netbeans 7.1 FTP QUIT命令

[英]Netbeans 7.1 FTP QUIT command

My FTP server reset connection every 120 seconds. 我的FTP服务器每120秒重置一次连接。 It's involve error: 它涉及错误:

227 Entering Passive Mode (10,98,2,230,204,124).
STOR style.css.new
150 Opening BINARY mode data connection for style.css.new
226 Transfer complete
RNFR style.css.new
350 File or directory exists, ready for destination name
RNTO style.css
250 Rename successful
CWD /site/templates/css
421 Idle timeout (120 seconds): closing control connection

if I upload file after 120 seconds. 如果我在120秒后上传文件。

In the Netbeans 7.0.1 on every uploaded file I get this in console: 在每个上传文件的Netbeans 7.0.1中,我在控制台中得到了这个:

227 Entering Passive Mode (10,98,2,230,214,189). 
STOR style.css.new 
150 Opening BINARY mode data connection for style.css.new 
226 Transfer complete 
RNFR style.css.new 
350 File or directory exists, ready for destination name 
RNTO style.css 
250 Rename successful 
QUIT 
221 Goodbye.

and I haven't any errors after 120 seconds. 而且120秒后我没有任何错误。

I think problem in last two strings... Netbeans 7.1 doesn't run 我认为最后两个字符串中存在问题... Netbeans 7.1无法运行

QUIT 
221 Goodbye.

after file uploaded. 文件上传后。

How can I enable QUIT command in FTP of Netbeans 7.1? 如何在Netbeans 7.1的FTP中启用QUIT命令? Thank you. 谢谢。

Go to your project properties. 转到您的项目属性。 Then go to "Run Configuration". 然后转到“运行配置”。 There you can then click on the Manage button for your Remote Connection. 然后,您可以在此处单击“远程连接”的“管理”按钮。 At the bottom of the input fields you will find one for the "Keep-alive interval(s)". 在输入字段的底部,您将找到一个“保持活动间隔”。 By default it is set to 30 seconds. 默认情况下,它设置为30秒。 If you enter a 0 instead, it disables the keep-alive feature. 如果改为输入0,它将禁用保持活动功能。 When I did it, it didn't send a quit right away, but it did after about 10 seconds or so. 当我这样做时,它并没有立即发出退出通知,而是在大约10秒钟后发出了退出通知。

I know this isn't a direct solution to the problem, but it's a workaround. 我知道这不是直接解决问题的方法,但这是一种解决方法。 In your PHP project properties, go to the category Run Configuration . 在您的PHP项目属性中,转到类别运行配置 Save your current config, "<default>", and then create a new config, which you set to run as Local Web Site (running on local web server) . 保存当前配置“ <default>”,然后创建一个新配置,将其设置为作为本地网站运行(在本地Web服务器上运行) I called mine "offline" but you can name it whatever you want. 我称我为“离线”,但您可以随便命名。 After you're done making changes to your project online, if you set the configuration from "<default>" to "offline", NetBeans will execute the FTP command QUIT . 在线完成对项目的更改后,如果将配置从“ <default>”设置为“ offline”,则NetBeans将执行FTP命令QUIT Just don't forget to go back online when you need to. 只是别忘了在需要时重新上网。

There are a number of ways to set the configuration. 有多种方法可以设置配置。 You could go to the Project Properties dialog window and set it in the Run Configuration Category; 您可以转到“ 项目属性”对话框窗口,然后在“ 运行配置类别”中进行设置 you could right click on your project in the Projects window and then go to the Set Configuration sub-menu; 您可以在“ 项目”窗口中右键单击您的项目 ,然后转到“ 设置配置”子菜单; or you can use the config drop-down list in your toolbar. 或者您可以使用工具栏中的config下拉列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM