|
Author: John Prather
Date: 26-03-03 19:32
The php source option needs to be in your httpd.conf for this to work with a line like:
AddType application/x-httpd-php-source .phps
Also, if you are still working on the file, you can symlink it so that changes you make to the .php file are displayed on php source webpage.
ln -s exampe.php example.phps
This way you won't have two copies of the same file confusing you if a slight change is made to one.
(and i think the original post meant to rename the file .phps, since one assumes the file already ends in .php)
|
|
Reply To This Message
|
|
Author: Jeff
Date: 28-09-03 15:01
Sweet thanks!
John Prather wrote:
> The php source option needs to be in your httpd.conf for
> this to work with a line like:
>
> AddType application/x-httpd-php-source .phps
>
> Also, if you are still working on the file, you can symlink it
> so that changes you make to the .php file are displayed on php
> source webpage.
>
> ln -s exampe.php example.phps
>
> This way you won't have two copies of the same file confusing
> you if a slight change is made to one.
>
> (and i think the original post meant to rename the file .phps,
> since one assumes the file already ends in .php)
|
|
Reply To This Message
|
|
Author: csinclair
Date: 05-09-06 19:06
If I understand the question correctly..
If the source is displayed instead of the page then the default .php is not set correctly in the httpd.conf file for the web server. Peruse the httpd.conf file for the line that reads..: DirectoryIndex index.html, change it to read ..:
DirectoryIndex index.php index.html .
Also make sure that the above mentioned directives are stated as well..
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
If all that is done and the apache server is restarted (ie. 'apachectl restart') it should work..
If that's not your question I'll read the next post and see if I can help.
Hope that helps..
c
Use the source Luke...
|
|
Reply To This Message
|
|
Author: Dan
Date: 05-09-06 19:16
A good answer. That's what is needed should someone be seeing PHP code instead of the rendered HTML.
Thanks.
--
Webmaster
|
|
Reply To This Message
|
|
Author: csinclair
Date: 21-11-06 16:21
No Problem,
I'm glad that that my post helped, I've wrestled with enough code over the years to know that a helpful answer to a well asked question is worth it's weight in gold, not to mention the time that it will save you.
;)
Craig
p.s. This web site has saved me hours and hours of headaches in the last few years by having a well organized, well structured topic list.
Thanks Dan!
Use the source Luke...
|
|
Reply To This Message
|
|