PDA

View Full Version : Reading in Data from a file


JuneBug
7-3-07, 02:42 PM
I sent up a txt file with this in it:
<script>
var msg = "blah blah blah";
document.write(msg);
</script>

and want my page to display the data. I have the:
<!--#include virtual="data/specials.txt"--> on the page

I have this in my .htaccess file:
AddHandler server-parsed .html
Options +Includes
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^---[NC]
RewriteCond %{HTTP_REFERER} !^---[NC]
RewriteCond %{HTTP_REFERER} !^---
RewriteRule \.(gif|jpg|jpeg)$ - [F]
ErrorDocument 404 http://---

It's not working. What did I do wrong?

(jj)
7-3-07, 04:02 PM
Change this:
AddHandler server-parsed .html

To this:
AddType text/x-server-parsed-html .html

JuneBug
7-3-07, 04:12 PM
Thanks! It works now.