Jump to content

Recommended Posts

[code]$stream = file_get_contents("sqlite.php");
echo $stream;[/code]

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

[b]Second Problem:[/b]
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.
Link to comment
https://forums.phpfreaks.com/topic/10401-solved-how-to-highlight-php-code/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.