Jump to content


Photo

display raw code


  • Please log in to reply
3 replies to this topic

#1 Chris Coin

Chris Coin
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 06 April 2006 - 02:55 AM

Is ther a way to show my raw code to the public with the "php colors"??

#2 Hooker

Hooker
  • Members
  • PipPipPip
  • Advanced Member
  • 193 posts
  • LocationWales, UK

Posted 06 April 2006 - 03:11 AM

Generally, PHP files will get interpreted by the Web server and PHP executable, and you will never see the code behind the PHP file. If you make the file extension .PHPS, a properly-configured server will output a color-formated version of the source instead of the HTML that would normally be generated.

#3 Chris Coin

Chris Coin
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 06 April 2006 - 03:14 AM

[!--quoteo(post=362125:date=Apr 5 2006, 11:11 PM:name=Hooker)--][div class=\'quotetop\']QUOTE(Hooker @ Apr 5 2006, 11:11 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Generally, PHP files will get interpreted by the Web server and PHP executable, and you will never see the code behind the PHP file. If you make the file extension .PHPS, a properly-configured server will output a color-formated version of the source instead of the HTML that would normally be generated.
[/quote]

so ther isnt a certain "tag" i could use. hmmm, i guess the only way is to color the code myself.


#4 bowenbowen

bowenbowen
  • Members
  • Pip
  • Newbie
  • 8 posts
  • LocationIpswich, Suffolk, UK

Posted 06 April 2006 - 07:50 AM

[!--quoteo(post=362127:date=Apr 6 2006, 04:14 AM:name=Chris Coin)--][div class=\'quotetop\']QUOTE(Chris Coin @ Apr 6 2006, 04:14 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
so ther isnt a certain "tag" i could use. hmmm, i guess the only way is to color the code myself.
[/quote]


Look into using highlight_string or highlight_file on the php.net website.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users