如何在webservice中传递URL
我希望将此URL作为Web地址中的值传递http://localhost/h2orn/php/verify.php?email=$emails&hash=$hash
但是,我只能在&符号之前传递..我想传递所有的url…
我正在使用java webservice
代码在这里:
$ message =“http://localhost/h2orn/php/verify.php?email = $ emails&hash = $ hash \ n \ n”;
$ url =“ http:// localhost:8084 / mail / webresources / EmailTest ”;
$ mail =“toAddress =”。 $电子邮件。 “&emailbody =”。 $消息;
尝试以前对其进行urlencode
从文档:
编码要在URL的查询部分中使用的字符串时,此函数很方便,这是将变量传递到下一页的便捷方式。
- You can use & instead of &.