Re: [PHP] Re: showing source

2007-05-20 Thread tedd
At 12:16 PM +0200 5/18/07, Christian Haensel wrote: Why don't you use: highlight_file(__FILE__) ? OMG I have been coding that thing for MONTHS now... just to get syntax highlighting for my tutorial blog... maybe I shouldn't write tutorials... maybe I should rather read them *g* Thanks for

[PHP] Re: showing source

2007-05-18 Thread James Lockie
M.Sokolewicz wrote: Why don't you use: highlight_file(__FILE__) ? I didn't know about that. Awesome, thanks. :-) I used the highlight_num from the comments to show line numbers. :-) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: showing source

2007-05-18 Thread Tijnema !
On 5/18/07, Steve <[EMAIL PROTECTED]> wrote: Not that it really matters in this scenario, but if you rename a file to .phps you should be able to navigate to it in a web browser and have nice, highlighted syntax. It's pretty nice for internally viewing a file, but obviously I wouldn't recommend d

[PHP] Re: showing source

2007-05-18 Thread Steve
Not that it really matters in this scenario, but if you rename a file to .phps you should be able to navigate to it in a web browser and have nice, highlighted syntax. It's pretty nice for internally viewing a file, but obviously I wouldn't recommend doing this with live files that contain sens

[PHP] Re: showing source

2007-05-18 Thread itoctopus
yup, highlight_file($file_name) is your magical answer. http://ca.php.net/highlight_file Make sure this function will only access specific directories. -- itoctopus - http://www.itoctopus.com ""M.Sokolewicz"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why don't you use: > high

Re: [PHP] Re: showing source

2007-05-18 Thread Christian Haensel
Why don't you use: highlight_file(__FILE__) ? OMG I have been coding that thing for MONTHS now... just to get syntax highlighting for my tutorial blog... maybe I shouldn't write tutorials... maybe I should rather read them *g* Thanks for this short, but awesome answer :o) I wasn't the one a

[PHP] Re: showing source

2007-05-18 Thread M.Sokolewicz
Why don't you use: highlight_file(__FILE__) ? - tul James Lockie wrote: This almost works but all my < and > are replaced with "". // open this file to show the source if (($fh = fopen( __FILE__, 'r' )) === FALSE){ die ('Failed to open source file (' . $_FILE_ . ') for