从php脚本输出格式化的html [英] Outputting formatted html from php scripts

查看:91
本文介绍了从php脚本输出格式化的html的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

人们通常会尝试从他们的

脚本中输出格式正确的html吗?


我一直在尝试使用表格的变量缩进等。

可以更容易地看到html并可能调试它,但它可以制作好看的b $ b丑陋的脚本。


什么'普遍的共识是什么?


Craig

Do people generally try and output nicely formatted html from their
scripts?

I have been trying to, with variable indenting for tables etc. It
makes it easier to see the html and perhaps debug it, but it can make
ugly looking scripts.

What''s the general consensus?

Craig

推荐答案

我大部分时间都这么做但是我从来没有一个丑陋的剧本因为它。


我没有把我的桌子缩进太远,有时我会重新开始嵌套

在colom 0表格。


-

Mike Bradley
http://www.gzentools.com - 免费在线php工具

" Craig Thomson" < CR *** @ spam.free>在消息中写道

news:76 ******************************** @ 4ax.com ...
I do for the most part, but I have never had an ugly script becouse of it.

I do not indent my tables too far in, some times I will restart the nesting
at colom 0 for a table.

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Craig Thomson" <cr***@spam.free> wrote in message
news:76********************************@4ax.com...
人们通常会尝试从他们的
脚本输出格式良好的html吗?

我一直在尝试使用表格的变量缩进等。
让人们更容易看到html并调试它,但它可以制作丑陋的脚本。

什么是普遍的共识?

Craig
Do people generally try and output nicely formatted html from their
scripts?

I have been trying to, with variable indenting for tables etc. It
makes it easier to see the html and perhaps debug it, but it can make
ugly looking scripts.

What''s the general consensus?

Craig



对不起,我发送的速度太快,这是我发布的其余部分。


有时我的桌子就像这样:


< table>

< tr>

< td>


< table>

< tr>

< td> stuff< / td>

< / tr>

< / table>


< td>

< / tr>

< / table>


-

Mike Bradley
http://www.gzentools.com - 免费在线php工具

" Craig Thomson" < CR *** @ spam.free>在消息中写道

news:76 ******************************** @ 4ax.com ...
sorry, I hit send too fast, here is the rest of my post.

sometimes my tables outout like this:

<table>
<tr>
<td>

<table>
<tr>
<td>stuff</td>
</tr>
</table>

<td>
</tr>
</table>

--
Mike Bradley
http://www.gzentools.com -- free online php tools
"Craig Thomson" <cr***@spam.free> wrote in message
news:76********************************@4ax.com...
人们通常会尝试从他们的
脚本输出格式良好的html吗?

我一直在尝试使用表格的变量缩进等。
让人们更容易看到html并调试它,但它可以制作丑陋的脚本。

什么是普遍的共识?

Craig
Do people generally try and output nicely formatted html from their
scripts?

I have been trying to, with variable indenting for tables etc. It
makes it easier to see the html and perhaps debug it, but it can make
ugly looking scripts.

What''s the general consensus?

Craig



Craig Thomson写道:
Craig Thomson wrote:
人们通常会尝试从他们的
脚本输出格式良好的html ?

我一直在尝试使用表等的变量缩进。它使得更容易看到html并可能调试它,但它可以使丑陋的脚本看起来很糟糕。

什么是普遍的共识?
Do people generally try and output nicely formatted html from their
scripts?

I have been trying to, with variable indenting for tables etc. It
makes it easier to see the html and perhaps debug it, but it can make
ugly looking scripts.

What''s the general consensus?




我不是:)


我可能会放几个\ n这里和那里(通常在< / tr>或< br />之后)但是

没有缩进下一行。如果我想查看生成的HTML,我首先要整理它。

HTML Tidy(@ http://www.w3.org/People/Raggett/tidy/

-

- =我的邮箱只接受= -

- =内容类型:text / plain = -

- =大小低于10001字节= -



I don''t :)

I might put a few "\n" here and there (usually after </tr> or <br/>) but
no indenting for the next line. If I want to look at the HTML produced I
tidy it first with
HTML Tidy ( @ http://www.w3.org/People/Raggett/tidy/ )
--
--= my mail box only accepts =--
--= Content-Type: text/plain =--
--= Size below 10001 bytes =--


这篇关于从php脚本输出格式化的html的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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