在URL的末尾添加变量 - PHP [英] Append variable at end of URL - PHP

查看:472
本文介绍了在URL的末尾添加变量 - PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要变量$ name追加到URL http://google.com/script.php 让我可以调用该变量在另一个脚本中。

我如何修改以下code,无需那些语法错误?

感谢。

codeS:

  $ name = $ _GET ['smsname'];
$调用= $客户 - >&问责GT; calls->创建('+ 103632',$号,
        http://google.com/script.php
    );


解决方案

附加它像这样

  $ name = $ _GET ['smsname'];
$调用= $客户 - >&问责GT; calls->创建('+ 103632',$号,
        http://google.com/script.php?name='.$name
    );

并在接下来的页面中,您可以用得到它 $ _ GET ['名']

I want to append the variable $name to the URL http://google.com/script.php so that I can call the variable in another script.

How do I modify the following code without having those syntax errors?

Thanks.

Codes:

$name = $_GET['smsname'];
$call = $client->account->calls->create('+103632', $number,                                             
        'http://google.com/script.php'
    );

解决方案

Append it like so

$name = $_GET['smsname'];
$call = $client->account->calls->create('+103632', $number,                                             
        'http://google.com/script.php?name='.$name
    );

And in the next page you can get it using $_GET['name']

这篇关于在URL的末尾添加变量 - PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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