gpt4 book ai didi

html - 如何 W3C 验证 php 图像调整大小脚本

转载 作者:太空宇宙 更新时间:2023-11-04 14:45:16 25 4
gpt4 key购买 nike

我使用一个 php 图像调整大小脚本,它是通过以下方式调用的:

<img src="/images/image.php?img=test.png&maxw=100&maxh=100" alt="This is a test image" />

但这并没有通过 W3C 验证。无论如何都要验证这个?

最佳答案

由于您没有给出确切的错误消息,我不得不假设验证因 & 符号而失败。看看the error description (也应该直接链接到验证报告,因此您可以很容易地自己找到它)看看如何解决这个问题。

To avoid problems with both validators and browsers, always use &amp; in place of & when writing URLs in HTML.

就是说,只需将您的代码更改为:

... src="/images/image.php?img=test.png&amp;maxw=100&amp;maxh=100" ...

关于html - 如何 W3C 验证 php 图像调整大小脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8926686/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com