如何在webservice中传递URL [英] How to pass URL in webservice
问题描述
我想将此网址作为网址中的值传递
http://localhost/h2orn/php/verify.php?email = $ emails& hash = $ hash
但是,我只能在&符号之前传递..我想传递所有的URL ...
I want to pass this URL as a value in web address
http://localhost/h2orn/php/verify.php?email=$emails&hash=$hash
but, i can pass only before ampersand symbol.. I want to pass all the URL...
我正在使用java webservice
I'm using java webservice
代码在这里:
$ message =http:// localhost / h2orn / php / verify。 PHP的电子邮件= $电子邮件和放大器;散列= $ hash\\\
\\\
;
$message ="http://localhost/h2orn/php/verify.php?email=$emails&hash=$hash\n\n";
$ url = http:// localhost: 8084 / mail / webresources / EmailTest ;
$ mail =toAddress =。 $电子邮件。 & emailbody =。 $消息;
$mail = "toAddress=" . $emails . "&emailbody=" . $message;
推荐答案
尝试 urlencode 之前
来自文档:
当编码要在URL的
查询部分中使用的字符串时,此函数很方便,这是将变量传递到下一个
页面的便捷方式。
This function is convenient when encoding a string to be used in a query part of a URL, as a convenient way to pass variables to the next page.
这篇关于如何在webservice中传递URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!