皇家PHP菜鸟问题。 [英] Royal PHP rookie question.

查看:54
本文介绍了皇家PHP菜鸟问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。



这段代码是从POST项目生成一个查询字符串,从PayPal返回发送到许可服务器,但我得到的变量名称不是变量值。



$ CustomerEmail = $ _POST ['payer_email'];

$ CustomerName = $ _POST ['address_name']; < br $>
$ OrderRef = $ _POST ['txn_id'];



fopen('http://192.168.2.2:2112/keygen.php ?productid = 5&$ CustomerEmail&$ CustomerName&quantity =1&OrderRef','r');





结果:



192.168.2.3 - [2014年1月24日:10:55:29 -0700]GET /keygen.php?productid= 5&\$ CustomerEmail \&\$ CustomerName \&quantity = \1 \\&OrderRef \HTTP / 1.0200 978 - -



我想要的是:



192.168.2.3 - [2014年1月24日:10:55:29 -0700]GET /keygen.php?productid=5&\buyer@buyer.com&John Doe&quantity =11234567890 HTTP / 1.0200 978 - -



PHP处理变量值与变量名称的方式正在抛弃这个PHP新手一个循环!



提前致谢



:Ron

Hello.

This bit of code is to generate a query string from POST items back from PayPal to send to a licensing server but I am getting variable names not variable values.

$CustomerEmail = $_POST['payer_email'];
$CustomerName = $_POST['address_name'];
$OrderRef = $_POST['txn_id'];

fopen('http://192.168.2.2:2112/keygen.php?productid=5&"$CustomerEmail"&"$CustomerName"&quantity="1""&OrderRef"','r');


Results in:

192.168.2.3 - - [24/Jan/2014:10:55:29 -0700] "GET /keygen.php?productid=5&\"$CustomerEmail\"&\"$CustomerName\"&quantity=\"1\"\"&OrderRef\" HTTP/1.0" 200 978 "-" "-"

What I want is:

192.168.2.3 - - [24/Jan/2014:10:55:29 -0700] "GET /keygen.php?productid=5&\buyer@buyer.com&John Doe&quantity="1" 1234567890 HTTP/1.0" 200 978 "-" "-"

The way PHP deals with values of variables vs variable names is throwing this PHP rookie for a loop!

Thanks in advance

:Ron

推荐答案

CustomerEmail =
CustomerEmail =

< br>

_POST ['payer_email'];
_POST['payer_email'];


CustomerName =
CustomerName =


这篇关于皇家PHP菜鸟问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆