使用PHP标记验证HTML代码的工具? [英] Tool to validate HTML code with PHP tags?

查看:56
本文介绍了使用PHP标记验证HTML代码的工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一些包含大量HTML代码的php页面。

我正在寻找一个HTML验证工具(如TIDY)。

TIDY对PHP标签不够好(它删除了很多php代码)。


你有什么想法吗?


非常感谢你


Rod

Hi,

I have some php pages with a lot of HTML code.
I am looking for a HTML validator tool (like TIDY).
TIDY is not good enough with PHP tags (it removes a lot of php code).

Do you have any idea?

Thanks you very much

Rod

推荐答案

** *webrodescribió/ written(2007年4月26日09:04:36 -0700):
*** webrod escribió/wrote (26 Apr 2007 09:04:36 -0700):

我有一些包含大量HTML代码的php页面。

我正在寻找一个HTML验证工具(比如TIDY)。

TIDY对PHP标签来说还不够好(它删除了很多php代码)。
I have some php pages with a lot of HTML code.
I am looking for a HTML validator tool (like TIDY).
TIDY is not good enough with PHP tags (it removes a lot of php code).



PHP是*不是* HTML因此,HTML验证器出现问题正是您可以期待的




我假设您要验证PHP脚本生成的HTML。只需

通过Web服务器加载脚本并使用W3C确认输出

验证器:

http://validator.w3.org


您有两种选择:


1)如果您的网站托管在公共服务器上,请使用

网址提供验证器


2)如果您的网站托管在本地测试服务器中,并提供一个文件

上传。使用浏览器的另存为功能并将其保存为纯HTML。


如果你谷歌用于Webdeveloper工具栏你会找到一个Firefox扩展名

和一个Internet Explorer工具栏;他们中的任何一个都可以帮助你验证

你的HTML。


-

- + http://alvaro.es - álvaroG。Vicario - 西班牙布尔戈斯

++ Mi sitio sobre programaciónweb: http://bits.demogracia.com

+ - Mi web de humor con rayos UVA: http://www.demogracia.com

-

PHP is *not* HTML so having problems with an HTML validator is exactly what
you could expect.

I presume you want to validate the HTML generated by your PHP script. Just
load your script through a web server and validate the output with the W3C
validators:

http://validator.w3.org

You have two options:

1) If your web is hosted in a public server, feed the validator with the
URL

2) If your web is hosted in a local test server, feed it with a file
upload. Use your browser''s "Save as" feature and save it as plain HTML.

If you Google for "Webdeveloper toolbar" you''ll find a Firefox extension
and an Internet Explorer toolbar; any of them can assist you in validating
your HTML.

--
-+ http://alvaro.es - álvaro G. Vicario - Burgos, Spain
++ Mi sitio sobre programación web: http://bits.demogracia.com
+- Mi web de humor con rayos UVA: http://www.demogracia.com
--


webrod写道:
webrod wrote:




我有一些包含大量HTML代码的php页面。

我正在寻找一个HTML验证工具(如TIDY)。

TIDY是PHP标签不够好(它删除了很多PHP代码)。


你有什么想法吗?


非常感谢你


Rod
Hi,

I have some php pages with a lot of HTML code.
I am looking for a HTML validator tool (like TIDY).
TIDY is not good enough with PHP tags (it removes a lot of php code).

Do you have any idea?

Thanks you very much

Rod



我看到你发布了这条消息separa几个新闻组,而不是

一次性发送到这些新闻组。


首先,这是你不必要的努力,其次,这意味着

响应只会出现在新闻组中,该响应会被发布。

检查alt.comp.lang.php以获取我的问题的答案。 />

如果您使用新闻客户端发布此内容,只需将您希望发布的所有新闻组添加到上面的收件人中,就像您收到的电子邮件一样。几个人b $ b人。如果您使用Google网上论坛发布,则可以在

To Newsgroups中输入多个组。字段,以逗号分隔。这将节省你的大量工作

否则会浪费在发布和检查所有这些不同的团体

(acpl,cpl,ap等):)


-

cb

I see you''ve posted this message separately to several newsgroups, instead of
sending it to these newsgroups all at once.

Firstly, this is a needless effort on your part, and secondly, this means
responses will only show up on the newsgroup that the response was posted in.
Check alt.comp.lang.php for my answer to your question.

If you posted this with a News client, just add all the newsgroups you want to
post to in the recipients above, like you would do with an email to several
people. If you posted with Google Groups, you can enter several groups in the
"To Newsgroups" field, separated by commas. This''ll save you a lot of work
otherwise wasted on posting to and checking to all these different groups
(a.c.p.l, c.p.l, a.p, etc.) :)

--
cb


oups!谢谢你,我不知道。

我以为这是不可能的。

对不起。


我在这里提供了答案:





我想我还不够清楚。


我不想验证php页面的输出,我想验证

php页面本身。

我的php代码NEVER提供HTML代码。这是一个非常重要的规则我

跟随。

我的意思是我从来没有这样做过:

<?php echo"< a href =''
oups! thanks you, I didn''t know that.
I thought it was not possible.
Sorry about that.

I provide my answer here:

Hi,

I guess I was not clear enough.

I do not want to validate the output of a php page, I want to validate
the php page itself.
My php code NEVER provides HTML code. That''s a very important rule I
follow.
I mean I never do that:
<?php echo "<a href=''


这篇关于使用PHP标记验证HTML代码的工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆