gpt4 book ai didi

installation - "URL Parts Error"inetc::post in nsis

转载 作者:行者123 更新时间:2023-12-02 07:06:58 25 4
gpt4 key购买 nike

我正在使用 nsis 开发安装程序。最后一步是用户注册过程,以获取他的电子邮件地址和一些其他数据并将其发送到服务器。代码如下。

StrCpy $ContactName "$0"
StrCpy $ContactEmail "$1"
StrCpy $Coments "$2"
StrCpy $Updates "$3"
StrCpy $PostStr "userName=$ContactName&userEmail=$ContactEmail&userComments=$Coments&updates=$Updates"

inetc::post "$PostStr" "http://www.mysite.com/registration/registerAcceptor.php" "$INSTDIR\output.txt"

Pop $0
StrCmpS $0 "OK" success failedToSubmit
failedToSubmit:
MessageBox MB_OK|MB_ICONEXCLAMATION "There was an error submitting the registration information"
Return

success:
MessageBox MB_OK|MB_ICONINFORMATION "Your information was successfully received by OrangeHRM"

但是当用户第一次尝试注册时,它会给出错误信息

"There was an error submitting the registration information"

当我使用如下消息检查命令的返回值时

MessageBox MB_OK $0

显示如下错误

URL Parts Error

但是当我返回并继续执行相同的操作时,它会给出成功消息并且返回值也为

OK

我不确定为什么这个东西在这两种情况下会以两种不同的方式起作用。有人可以帮忙吗。

提前致谢。

最佳答案

尝试按照 this forum thread 中的建议将“/END”添加到插件调用中(堆栈上可能还有其他东西,插件不知道什么时候停止读取,这可以解释为什么它第二次工作)

关于installation - "URL Parts Error"inetc::post in nsis,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10413503/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com