Click to See Complete Forum and Search --> : Need alternate to using SSI #include


ComputerJoe
11-21-2010, 09:04 AM
My page is on a host that does not include SSI in its package. All I want is for a customer to send me a plain text file that I can FTP up and have the text included in a page that I have already built header and sidebars into.
I have a page where I open a text file using a <a href=> reference but I cannot format any visual elements outside of the plain text file.

DanInMA
11-21-2010, 09:10 AM
well depending on what you're doing you could use an ajax call to load it, couldn't you? I'm not great with JavaScript but Jquery has easy to use methods like .load() to do a similar job.

ComputerJoe
11-21-2010, 03:36 PM
Thanks, I needed a direction

yamaharuss
11-21-2010, 03:59 PM
Use server.execute("file.txt")

ComputerJoe
11-22-2010, 02:10 PM
<% server.execute("myfile.txt") %>

I believe that this method is meant to executed an ASP script not a txt file. Then it leaves my customer having to edit a coded page of ASP which they will goof up, I can count on it.

yamaharuss
11-22-2010, 02:11 PM
You are incorrect.

ComputerJoe
11-22-2010, 02:32 PM
Well I tried running the line from html and then asp with nothing but a blank screen resulting. Need more input.

yamaharuss
11-22-2010, 02:35 PM
The code is not going to run in an HTML file.

If you create a text file named test.txt and place the text "hello world"

then create test.asp page (in the same directory) and place the following code:

<% server.execute("test.txt") %>

when you run test.asp you will see hello world.

If not, then you do not have ASP installed on your server or you have some other serious application problems.

ComputerJoe
11-22-2010, 02:48 PM
That's exactally what I did. It must be further restrictions from my web-host even though they say ASP is supported.
HTTP://www.AlpenaKofC.org/0529Newsletter.asp
HTTP://www.AlpenaKofC.org/0529_NewsLetter.html

[0529Newsletter.asp]
<% ' Created on: 11/22/2010 %>
<html>
<body>
<% server.execute("0529NewsLetter.txt")

%>
</body>
</html>


[0529NewsLetter.txt]
January -------------------------------------------------------------
4
7:30pm
Regular Meeting
Ladies Auxiliary
18
7:30pm
Home Association meeting

29
LADIES DAY

criterion9
11-22-2010, 04:33 PM
they say PHP is supported

Then you'll need to use PHP codes instead of ASP codes...

EDIT: Disregard since you've edited the post above.

ComputerJoe
11-22-2010, 05:37 PM
Everything I read was that PHP, ASP, and MySQL were supported. Now I find out there were two "beginner" accounts. One Linux the other MS. The Linux account didn't support squat and that is where 1and1 put me. I can swing over to their MS Beginner account but will need to reload all my web-pages....lots & lots of web pages for 6 customers sites. No extra cost for doing so though and for 3.99 a month and tons of web space I can't complain much, just a bunch of wasted time. Can not do anything until Wednesday so I can reload the pages over T-Day.

Thanks

yamaharuss
11-22-2010, 06:10 PM
Find a decent host instead of penny pinching, not to mention sharing bandwidth with 10 millions other users.

criterion9
11-22-2010, 06:58 PM
You could always just use the PHP equivilents... <?php include("textfile.txt");?>