If your browser is trying to download the file it's because the web server
isn't configured to recognize the file type. In your httpd.conf file you
should have a line similar to the following:

AddType application/x-httpd-php .php .php3 .phtml

In order to do what you are wanting, you also need a line similar to the
following:

AddType application/x-httpd-php-source .phps

That alone won't finish the job. You also have to make a copy of the .php
file with a .phps extension. Or, of you are on Linux, you can simply do an
'ln -s original.php original.phps' and use the .phps link to display the
source.

This is the way apache does it. You can also do the same thing manually in a
php script using highlight_file() or as already mentioned, the show_source()
command which is just an alias for highlight_file(). Either way will produce
the same results since Apache simply send the command through mod_php. This
is really more of an apache question involving php.

Later,

Bob Weaver

"Mantas Kriauciunas" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hey [EMAIL PROTECTED],
>
>  as i understand files .phps should view code nice and in colors...
>  but when i set up everything good in http.conf and (as i think)
>  everything is perfect.... it wants me to download that .phps
>  file...what can be wrong? im using PHPTriad on win2k
>
>  thank you
>
> :------------------------------:
>         Have A Nice Day!
>  Mantas Kriauciunas A.k.A mNTKz
>
> Contacts:
> [EMAIL PROTECTED]
> Http://mntkz-hata.visiems.lt
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to