• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do I get apache to exlude php.txt files?

Wait, so are these php files with ".txt" as their final ending? Or are they just plain text PHP files (i.e., they end with ".php").
 
You didn't answer the question. What are the extensions on the files you're trying to have not processed? Better yet, post an exact example of a file name.

Find the line in your httpd.conf that specifies which files to processes as php and make sure the expression doesn't match your file.
 
You're talking about the apachewebserver, I think you have an option in PHP of not parsing the file. Just give the file extension which you do not want parsed.
 
From my php.conf file (included into httpd.conf):
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
I'd suggest adding the 2nd line to your httpd.conf (uncommented of course) if it's not already there. If you don't want to do that you can always just rename the file to xxx.php_txt or something else that won't qualify as php.

Heh, I just tried the phps option and it did a nice syntax highlighting!
 
Originally posted by: kamper
From my php.conf file (included into httpd.conf):
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
I'd suggest adding the 2nd line to your httpd.conf (uncommented of course) if it's not already there. If you don't want to do that you can always just rename the file to xxx.php_txt or something else that won't qualify as php.

Heh, I just tried the phps option and it did a nice syntax highlighting!

Yep, it's a nice feature.
 
Back
Top