[英]How do I send data to a php file from my installer?
I am trying to verify user passwords on my NSIS installer so I am sending to my encoding php script to compare values. 我正在尝试在NSIS安装程序上验证用户密码,因此我将发送至编码php脚本以比较值。 It does not seem to be interacting with the php script at all.
它似乎根本不与php脚本交互。 I believe my issue might be in the PHP.
我相信我的问题可能在PHP中。
<?php
include ("Encryption.php");
$data = $_POST;
$a = new encryption_class();
$encryption = //encryption code;
?>
<html><head>
<title> - </title></head>
<body>
<? echo $data ?> <br>
<? echo $encryption;?>
</body>
</html>
I feel like i am missing something when i try to send the information from the installer to the php script with the post method. 当我尝试使用post方法将信息从安装程序发送到php脚本时,我感觉好像丢失了一些东西。
Sorry...here is the NSIS call 抱歉...这是NSIS的电话
Section
SetOutPath $DOCUMENTS/
StrCpy $1 "userpass"
#text files for reading and writing with the post command
File "pass.txt"
File "encrypt.txt"
#write the user variable to the pass.txt file
ClearErrors
FileOpen $0 pass.txt w
IfErrors done
FileWrite $0 "$1"
FileClose $0
done:
FileOpen $3 encrypt.txt w
inetc::post $0 /FILE "http://mywebserver/installer_get_pass.php" $3 /END
SectionEnd
I haven't finished the script but when i open the txt file where the output should be written it is blank 我尚未完成脚本,但是当我打开应该在其中写输出的txt文件时,它为空白
inetc::post $0
passes a (closed!) file handle to the plugin. inetc::post $0
将一个(closed!)文件句柄传递给插件。 Parameter $3
a similar problem, try using paths: 参数
$3
有类似问题,请尝试使用路径:
...
done:
StrCpy $0 "$documens\pass.txt"
StrCpy $3 "$documens\encoded.txt"
inetc::post $0 /FILE "http://mywebserver/installer_get_pass.php" $3 /END
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.