PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Wed Apr 27, 2005 4:07 pm
Is the function for coloring [.php] code publicly available?
Code: Select all
if ( code->isPubliclyAvailable() )
askWhereIsCode();
Thanks.
Revan
Forum Commoner
Posts: 83 Joined: Fri Jul 02, 2004 12:37 am
Location: New Mexico, USA
Contact:
Post
by Revan » Wed Apr 27, 2005 4:51 pm
Name the code .phps
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Wed Apr 27, 2005 4:55 pm
mmm... then look at it in a browser... i presume, but firefox prompted me with a download - am i missing something
timvw
DevNet Master
Posts: 4897 Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium
Post
by timvw » Wed Apr 27, 2005 4:58 pm
it also requires you to have something like
AddType application/x-httpd-php-source .phps
in your httpd.conf
an alternative is the
http://www.php.net/higlight_string function
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Wed Apr 27, 2005 5:04 pm
If i'm not hosting myself, how could i go about doing that to the http.conf?
Revan
Forum Commoner
Posts: 83 Joined: Fri Jul 02, 2004 12:37 am
Location: New Mexico, USA
Contact:
Post
by Revan » Wed Apr 27, 2005 5:14 pm
In an .htaccess in the folder your .phps is, put
Code: Select all
AddType application/x-httpd-php-source .phps
should work.
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Wed Apr 27, 2005 5:18 pm
unfortunately that was unsuccessful
Revan
Forum Commoner
Posts: 83 Joined: Fri Jul 02, 2004 12:37 am
Location: New Mexico, USA
Contact:
Post
by Revan » Wed Apr 27, 2005 5:37 pm
Todd_Z
Forum Regular
Posts: 708 Joined: Thu Nov 25, 2004 9:53 pm
Location: U Michigan
Post
by Todd_Z » Wed Apr 27, 2005 6:01 pm
that worked, i mean the AddType in htaccess didn't work. (sorry for the ambiguity)