Jump to content

Recommended Posts

Posted

I was attempting to add a file extension that runs through the php code parser that converts "<? echo("test"); ?>" into "test" i know php, php3, php4, php5, php6 all convert that code but i was attempting to add .pro to them. I found out that you should add it into the apache handlers i think. So i added application/x-httpd-php to the list with the extention i wanted .pro but i open the browser. the code pops up and is not converted by the php script builder and i was wondering why it wasn't i tried everything this article showed but it didnt work help please?

Posted

I tried both the AddType and the AdHandler and neither one nor both together worked for me either.

 

AddType application/x-httpd-php .pro
AddHandler application/x-httpd-php .pro

 

I Also noticed awhile back that the .phps extention doesn't work either and the mime type is already there by default in the MIME Types.

 

http://byrondallas.heliohost.org/php/countdown.phps

 

Maybe djbob will look into this?

 

 

Posted

When I add a x-httpd-php5-source handler and try to point .phps files to the that handler, I get a strange error that turns up nothing in Google ("Handler application/x-httpd-php5-source not found"). Except if I actually enter a Handler it doesn't know, Apache should (and does) just ignore it. Look like syntax-highlighting is poorly implementing in suPHP. I recommend trying this hack to get around the issue (the FAQ they source is outdated to show that suPHP can't handle syntax highlighting is outdated, though; suPHP claims it is supported as of version 0.7.0).

Posted

Seems the syntax-highlighting is working just not with the .phps

 

<?php
highlight_file('analog-clock.php');
?>

 

http://byrondallas.heliohost.org/php/php-highlight_file.php

 

It's not that big of a deal (.phps) since I can use that function if I want to color code my php and there's also a function to highlight just a string of code.

 

highlight_string('');

 

It was just a little easier to add the s to the file name and resave it that way.

 

 

Posted

I just went back and looked at that hack again and they're using the same function too.

 

highlight_file();

 

I might just add that to my site so I can use .phps

 

 

 

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...