Re: .phps

From: Date: Sat, 20 Apr 2002 16:27:28 +0000
Subject: Re: .phps
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-93816@lists.php.net to get a copy of this message
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" <Mantuks@attbi.com> wrote in message news:7514715379.20020419231252@attbi.com... > Hey php-general@lists.php.net, > > 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: > Mantuks@attbi.com > Http://mntkz-hata.visiems.lt >

« previous php.general (#93816) next »