server-side-includes

SSI or PHP Include()?

Hi all, basically i am launching a site soon and i predict ALOT of traffic. For scenarios sake, lets say i will have 1m uniques a day. The data will be static but i need to have includes aswell I will only include a html page inside another html page, nothing dynamic (i have my reasons that i wont disclose to keep this simple) My quest...

Any way for a server-side include to get the file name or URL of the file where it is being included?

Is there any way for a server-side include to determine what file it is being included in? I would like to do something like this: <ul id="menu"> <!--#if expr="$URL = index.html" --> <li><span>Home</span></li> <!--#else --> <li><a href="index.html">Home</a></li> <!--#endif --> <!--#if expr="$URL = about.h...

php includes that include another php file

I'm getting really muddled up now and my brain hurts! :( lol Root: index.php Includes: cat.php dog.php index includes dog: include("includes/dog.php"); dog includes cat: include("cat.php"); When I run index, for cat it says: A link to the server could not be established Access denied for user ... However, if I run dog, I...

include .html in a .html

Hello, I used the script <!--#include virtual="dontate.html" --> to include a .html file into another .html file, but for some reason does not show up. Any reason as to why? I will be using WAMP and LAMP. Thanks Jean ...

including other pages in HTML documents

Let say you are working on a website template that has many pages (index.html, blog.html, contact.html...). You start by designing the home page and then move on to other pages. While you are on other pages, you think of some improvements and these improvements must affect the whole website. So I return to each page and make the change....

How to refresh #include files - they are caching on IIS7 / ASP.NET

I have an ASP.NET master page which references a #include file as follows: <!--#include virtual="/includes/scripts.inc"--> I have modified the file /includes/scripts.inc but the changes do not show up in pages. What needs to be done so modifications will be reflected? I need to avoid the following: restarting the server restarting ...

Make a link to DIV on site only

Is it possible to link to ONLY a div on a web page? For example, <html> <body> Here is some content I don't care about <div class="stuff"> Here is some content I want. Blah blah. It may change from time to time </div> Here is more content I don't care about and do not want to see when this...

passing array parameters to smarty PHP template include

On a PHP site using the smarty template engine (or at least a close relative of smarty), I am calling a template include file ("header.html") which contains this code excerpt, along with other HTML omitted here for clarity: <title>{$title|escape:"html"}</title> {if isset($META) && $META} {foreach from=$META item=m} <meta nam...

include_path doesn't recurse?

I have several separate websites that live in separate directories. For includes that they have in common, I have it living in the root directory where the rest of them live. user@hostname:/var/www$ ls website_1 website_2 website_3 common_files I want to include a Zend package, so I have my include path ini_set("include_path", get...

I have PHP code that needs to be referenced in every single shtml page, is the below possible?

Hey everyone... I'm not too familiar with PHP... but I have PHP code that basically "includes" a file if a condition exists. This PHP code is going to be pretty lengthy and I was wondering if it was possible to create a .php file, and just INCLUDE THAT in my shtml files? What the below is doing is placing the correct navigation bar in ...

validity of classic ASP include pattern

Hello, Here is a pattern I am thinking about in ASP : Imagine you have a file main.asp that contains <!--#include file="1.asp"--> code of 1.asp ...my code... Do you think it is valid to refactor this as main.asp Dim defined_1_asp = false <!--#include file="1.asp"--> 1.asp if (not defined_1_asp) then defined_1_asp = tr...

Using too many PHP includes a bad idea?

My question is whether or not using multiple PHP includes() is a bad idea. The only reason I'm asking is because I always hear having too many stylesheets or scripts on a site creates more HTTP requests and slows page loading. I was wondering the same about PHP. ...

Conditional SSI Based on URI

I am redoing the navigation bar that is included several dozen of my site's pages. One of the changes that I want to make is to vary the content that is included, based on the page that the user is on. Thus my plan is basically to have the file that is currently included everywhere act as a selector to decide which actual file(s) to incl...

Configuring SSI in Tomcat 6.0

I'm trying to configure SSI with Apache Tomcat 6.0. Following this http://tomcat.apache.org/tomcat-6.0-doc/ssi-howto.html, I have removed the comments aroud the ssiServlet in $CATALINA_BASE/conf/web.xml. Also setup the previleged = "true" in context tag found in $CATALINA_BASE/conf/context.xml After setting this up, i tried to start th...

Is SSI still relevant?

On my work i can see old sites using SSI to include huge parts of code and do some conditional work. I'm just curious is SSI still developing? If not, what modern simple server-side scripting languages exist? ...

Is it good practice to check user-agent with SSI?

For example, what if for reasons of purity code I replace conditional comments with HTTP_USER_AGENT check? Instead of <!--[if lt IE7]> <link rel="stylesheet" href="/css/ie6.css" type="text/css" /> <![endif]--> i write <!--#if expr='$HTTP_USER_AGENT=/MSIE 6.0/' --> <link rel="stylesheet" href="/css/ie6.css" type="text/css" /> <!--#en...

Why don't SSI's work for me?

I'm trying to include one html file into another. I'm coding on the MAMP stack. I assume SSI's are automatically permitted. I type <!--#include virtual="header.html" --> in the body of one html file, the other file is called header.html, and they are both in the same folder. I even tried calling the file header.shtml instead. Non...

I'm having trouble following these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i

I want my apache server to parse shtml files so I can include them in other html files, but I can't seem to understand how to modify the config files, even with these instructions: http://httpd.apache.org/docs/1.3/misc/FAQ.html#ssi-part-i Could anyone provide really really specific instructions? Such as specifically what files to open, ...

problem with server side includes for html page in visual studio

I have the following html pages example1.html ,header.html,searchpanel.html i have server side includes control in example1.html to refer for header.html and searchpanel.html the problem is this works fine when i browse through dreamweaver but when run the example1.html through visual studio it does not refer to header.html . This is ex...

Equivalent of include() in HTML

I was wondering wether there is a way to include some html content inside another html using only html? A replacement to PHP's <?php include("file.php"); ?> Is this possible? EDIT: This has brought up some confusion, what I needed was "almost an html tag" that had the functionality of including a html document in another. ...