我被要求对 URL 进行编码。我该怎么做?

发布于 2024-12-19 07:06:47 字数 259 浏览 2 评论 0原文

我被要求将标题图像参数编码到基本 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执笔绘流年 2024-12-26 07:06:47

在 php 中你可以使用这个函数

urlencode($string);

in php you can just use the function

urlencode($string);
来日方长 2024-12-26 07:06:47

http://php.net/manual/en/function.urlencode.php

$url = 'http://www.example.com/your/url/goes/here';
urlencode($url);

上面的代码将获取一个字符串并对其进行正确编码以便在 URL 中使用。

http://php.net/manual/en/function.urlencode.php

$url = 'http://www.example.com/your/url/goes/here';
urlencode($url);

The above will take a string and encode it properly for use in a URL.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文