超越PHP PHP动态 | 经典文章 | CLASS | 相关下载 | 常见问题 | FORUM | WIKI | 在线手册
Site search:    
<php_strip_whitespacesleep>
Last updated: Fri, 22 Jun 2007

show_source

show_source -- Alias of highlight_file()

Description

This function is an alias of highlight_file().




add a note add a note User Contributed Notes
show_source
aaron at aaron-wright.com
04-Aug-2002 11:33
[editors note: str_pad() function could be a rather elegant solution]


Not to sound picky or anything, but the first example of the line-numbering is great, but this is the one change

that (in my opinion) makes it perfect:

$source[$i] = "<code>[$i]".str_repeat("<span style=\"color: #ffffff\">0</span>", 4 - strlen ($i))."</code>$source[$i]<br />";


That combines the second comment of not setting the lines crooked and the original idea into one. The zeros used as placeholders are matched to the background-color (white, usually...) so you don't have to stare at them.

<php_strip_whitespacesleep>
 Last updated: Fri, 22 Jun 2007
view source | feedback | send page | sitemap | aboutus   
Copyright ® 2002-2003 PHPE.NET. All rights reserved
Last updated:2002-11-22