我被要求对 URL 进行编码。我该怎么做?
我被要求将标题图像参数编码到基本 URL 中,但我不知道如何执行此操作。这是他们向我提供的文档的屏幕截图:http://postimage.org/image/6hkscqdld/
基本上他们有一个我应该使用的页面,但我可以通过向 URL 添加参数来向该页面添加自定义标题图像,但是必须对动态标题图像标记进行编码。我将如何对其进行编码?
I am being asked to encode a header image parameter into a base url but I am not sure how to do this. Here is a screenshot of the document they have supplied me: http://postimage.org/image/6hkscqdld/
Basically they have a page that I am suppose to use, but I can add a custom header image to that page by adding a parameter to the URL, however the dynamic header image tag must be encoded. How would I go about encoding it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 php 中你可以使用这个函数
in php you can just use the function
http://php.net/manual/en/function.urlencode.php
上面的代码将获取一个字符串并对其进行正确编码以便在 URL 中使用。
http://php.net/manual/en/function.urlencode.php
The above will take a string and encode it properly for use in a URL.