开发者

How to valid the many possible HTML pages which my PHP code may generate?

Every path through the PHP code might generate a different HTML page.

I generall开发者_如何学运维y take a few variants of each success case and run them through the W3C HTML validator every release ... and at best I can hope to cover 20% of the pages which my code might generate.

This sounds like a tall order, but is there any tool which can at least reduce the amount of invalid HTML which my code might produce? Even just catching my favourite <p. instead of <p> would be a boon.

I can see how tough it would be ... even catching missing end tags might mean parsing through if ... else or switch logic in PHP ...

I think I just answered my own question ... but ...


Have a look at PHP's Tidy

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜