473,372 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,372 software developers and data experts.

Importing a Menu (Through SSI?)

Hi everyone,

I hope I'm alright in posting this here, I searched and couldn't find any help with this, or even a hint as to where I can ask this.

I'm new to SSI and all that . . . actually just heard of it today. I'm wanting to be able to import a menu so that I don't have to edit each page when I edit something on the menu.

I heard of SSI and figured that would be best. So I looked up on it a bit, my server does support it, and the .htaccess file has been edited to enable it and such.

However . . . How do I get it to import? I saw the code:
Expand|Select|Wrap|Line Numbers
  1. <!- #include file="filename.txt" ->
should work, but nothing is happening. Is that the wrong code? Or is there other code that I need to put to make it work?

I really appreciate the help with this, and apologize if this is the wrong area to ask it. I'm unsure where else to ask, and so figured I would ask here being that the code is being placed in an HTML page and such . . .

Thank you in advance for the help!

PS--the website is workmenforChrist.org. I know the code there needs a lot of work, but that's in the works. I'm trying to first see if I can get the sidebar menu and such working through SSI to start things off . . .


~Michael
Sep 17 '07 #1
7 1692
ronverdonk
4,258 Expert 4TB
The format of the HTML comment is
Expand|Select|Wrap|Line Numbers
  1. <!-- your text -->
so your statement should be
Expand|Select|Wrap|Line Numbers
  1. <!-- #include file="filename.txt" -->
Ronald
Sep 18 '07 #2
I thought so, that's another code I saw for it.

But it's still not working for me. Nothing is showing up . . .

Would it possibly help to post the contents of the .htaccess file to see if that is right? I tried putting in a code I read was what I needed, but that didn't work. Then I tried going about it by letting the server CP put in the code itself (my host has an option to actually create the file, and has boxes for options I want to use such as SSI, and it puts the code in there for me), but it still did not work. Then I put in BOTH codes and it did not work still. . . sheesh!
Sep 18 '07 #3
Well, I was told by my host that apparently ASP isn't supported by them, so I just used the

Expand|Select|Wrap|Line Numbers
  1. <?php include 'vars.php'; ?>
Instead, and everything I was trying to import, was imported!

The only thing is . . . It may have been just a one-time occurance, but when I first used a link imported, it took a bit longer to get to the linked page than usual. Would importing something like that do that? (I would assume it wouldn't affect load times for links, but I'm just wanting to know from someone who actually knows all this SSI stuff haha.)

Thanks again!

~Michael
Sep 18 '07 #4
ronverdonk
4,258 Expert 4TB
Many times a server is configured for SSI by setting the extension of the embedding script to .SHTML, the most common extension configured to parse SSI by default.
Is that also the case with your server? In that case any other extension will not work properly. If you don't know, find out from your SP.

Anyway, I think that the PHP solution ts still the best.

Ronald
Sep 18 '07 #5
Yeah, I'm not sure if that is the case of my own host. But I was pretty against the idea of having to change all the extentions to shtml . . . that would mean even more changing of links, an trouble with people who link to my site, and bookmark pages. At best I'd have to create a redirection, but still . . .

But I agree, the php seems to be the easiest way . . . and the least problematic for my users . . . hopefully!
Sep 20 '07 #6
ronverdonk
4,258 Expert 4TB
Good luck with your script.

Ronald
Sep 20 '07 #7
Thanks! :)

Trying to sort through it all to learn just a bit of CSS period. Sheesh, all the info on it and everything, actually makes it harder to learn (at least for me personally)!

But thanks again!
Sep 20 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: sparks | last post by:
I have never done this and wanted to ask people who have what is the best way. One person said import it to excel, then import it into access table. but since this will be done a lot, I am...
2
by: Sara | last post by:
Hi - I've been reading the posts for a solution to my query, and realize that I should ask an "approch" question as well. We receive our production data from a third party, so my uers import...
4
by: Ian Davies | last post by:
Is there a way to stop importing tables from an mde database to a newly created database. I wish to protect the data in the mde so that it can only be accessed through a particular front end...
9
by: jillandgordon | last post by:
I am trying to import an excel file into Access 97. It looks perfectly all right but, every time I try to import it, I get to the lst step and am told that it was not imported due to an error. ...
10
by: hendafe | last post by:
I have a problem of importing a text file into Access. The text file will be imported using a delimiter, say ( , ) for example. This should be imported into the database. An example is: John,...
29
by: Natan | last post by:
When you create and aspx page, this is generated by default: using System; using System.Collections; using System.Collections.Specialized; using System.Configuration; using System.Text; using...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
1
by: Tom Burton | last post by:
Hi Thanks to you help I am beginning to get there with regards to my webpage.. Pigeon droppings it my still be but I'm getting there and learning lots. But I was wondering, rather than...
28
by: kkadakia | last post by:
I get a daily excel file for a entire month which I want to transfer into Access at the end of the month. So, there are around 20-25 excel files I get by the end of the month, and I would like to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.