Jump to content


**SOLVED** How to Highlight PHP Code ?

  • Please log in to reply
No replies to this topic

#1 The_Holy_One

  • New Members
  • Pip
  • Newbie
  • 8 posts

Posted 25 May 2006 - 01:23 AM

$stream = file_get_contents("sqlite.php");
echo $stream;

First Problem:
paragraph doesnt work, if the text inside of the file says:
it will shown as one long line: ABC DEF

Second Problem:
How to let PHP automaticly Highlight PHP Code ? I see it so often in other Boards or at Homepages, it should be easy but i have no idea how to do it. I think there must be a easier solution as to search specific Keywords. I also found following in my php.ini:
; Colors for Syntax Highlighting mode. Anything that's acceptable in
; <span style="color: ???????"> would work.
highlight.string = #DD0000
highlight.comment = #FF9900
highlight.keyword = #007700
highlight.bg = #FFFFFF
highlight.default = #0000BB
highlight.html = #000000

but how to use it ? thanks for any tipp.

google is your friend ... show_source($stream) is the solution ^^ lol, i will test it immidiatly.

i am a morron: show_source("filemanager.php"); // works perfect :D as long php.ini is set.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users