server-side-includes

Configuration of SSI in IIS 7

Hi, I've installed ServerSideIncludes module on my computer and it works great with one exception. <!--#include virtual="meta.inc" --> The line above is causing the problem. I know I must change virtual with file but I have a huge website and it means I must change at least 1000 line of code like this and I am looking for a way to ru...

Server side include (ssi) if condition not working

the if contition is to test for the day of the week: <!--#if expr="$DATE_LOCAL = /Thursday/" --> Thursday <!--#endif --> this works if the .shtml is in a static location but, not inside a war. Yes the web.xml file has been configured correctly. as this <!--#echo var="DATE_LOCAL" --> works fine, for the .shtml page inside the war. i...

How can I get aspnet compiler to handle a page that contains an include file

I have a web application that lands on a shared hosting platform for my company. That platform has global header/footer code that all applications on the platform consume using include files. I can't change how the header files are structured and how they are to be cosumed--that is dictated to me by another group. I have a build serve...

Access to variables in an asp.net user control vs an include file

I've asked this question before but couldn't get the answer I was looking for so I'm going to try it again. I'm translating pages from old asp to asp.net and I don't want to do this any other way so I really just want to know if this can be done. In asp, I'd assign a variable on one page <% myVar = "something" %> I could assign man...

JSP equivalent to the PHP include() function?

I just want to include an HTML file server-side into another HTML file, using JSP. PHP is not available. Is this what I want? <jsp:include page="/include.html"></jsp:include> ...

php class performance question...what should I do?

I'm building a webapp using php, ajax, javascript, mysql. I've been worring about something for a while, but not sure if it's really a problem or not. Here's the basic concept of how the code is working...I would like to know if I should change it now, or if it is o.k to use as is. Performance is important to me...over 5,000 users sho...

Efficiency for including files of functions (in PHP)

If I had a large number of functions would it be better to keep them all in one large file or would it be better to separate them into several files of related functions. By better I mean more efficient for both maintainability and for the server processing the request. For example right now I have all my files in a file named include.p...

Problems with Server-side Includes

I desperately want to use server-side includes in a project I'm working on because I just have some HTML that repeats and I need to get it on several pages. Must I use ascx or some other include technology... I mean, will lightning strike if I use server-side includes? My client -- the middle-person -- says "do what's easiest, this wil...

SSI - Can view in dreamweaver but not on ther server.

I have a line of code that I am unable to view. I am using a spry nav bar. I am saving the files as navigation.shtm, and the file that it is going is is products.shtm This is a simple link and it should be working fine but I can get it to work correctly. <div id="column1"> <div class="menu"> <div> <!--#include file=...

PHPUnit - testing file inclusion methods (include, require, require_once)

I'm writing and testing a ClassLoader component, which can be instantiated many times, with various mappings between class names and their relevant paths. Each ClassLoader should work as a loader for a specific package. Is there an easy, unobtrusive way to test or mock inclusion of files handled by the ClassLoader? Let me clarify with ...

My includes dont seem to be working now that i have uploaded the files to the production server

They were all working fine on my XAMMP sandbox but now nothing. Something im doing wrong. Here is the code: index.php Contains mass include, which basically has all the includes in it. <?php //Starting session session_start(); //Includes mass includes containing all the files needed to execute the full script //Also shows homepa...

Running PHP without extension without using mod_rewrite?

Using Apache 2.2 and PHP 5, what's the best way to run PHP without the .php extension. For example, I have a script called app.php and I like to invoke it as http://example.com/app Please notice that I still want keep the .php extension to the file and I don't have mod_rewrite. Don't want use index.php either because it requires too ma...

How Server-Side Include Work without File Extension?

This question is related to this one, http://stackoverflow.com/questions/2358178/running-php-without-extension-without-using-mod-rewrite So by adding this to my .htaccess, I can run PHP script without the extension, AddHandler server-parsed .php SetHandler application/x-httpd-php AddHandler application/x-httpd-php .php I am not fami...

What is the right path for PHP includes on a Mac?

Running Mac OS X 10.5.8, with PHP 5.2.11 Pre-installed. Using Coda 1.6.10. I'm writing PHP files, and then preview them running from file, not server. This was working fine till I tried PHP includes. These don't work as a relative path, only as an absolute from the root of the drive. Is there any way I can use statements like incl...

Set a class for an element in a PHP include()

I have an identical horizontal menu at the top of all of my pages, which I add using a PHP include() statement. In my stylesheet I want to have a class where if the user is on a particular page, the menu item corresponding to that page will have a different color. So, more or less: #menu { background-color:blue; } #menu .active { back...

A way to edit content by altering one file?

Hi, I have a contact css tab on my left side on my website, I have more then 30 pages and I don't wantto manually alter all those pages later when data had changed. Does anyone knows a sollution so I only have to alter 1 file to have all pages edited? Perhaps in javascript? The code below is for the tab <div class="slide-out-div"> ...

html includes in a JSP using IIS/WebLogic

I have my IIS 6 server setup to process server side includes, we're also using the WebLogic ISAPI plugin for IIS. I have a simple html file that I'm trying to include in the JSP using the following include: <!-- #include file="/pleaseWait/pleaseWait.html" --> When I use the above line in a JSP I get an error message saying: "pleaseWa...

What is the scope of require_once in PHP?

Simple question: Is the scope of require_once global? For example: <?PHP require_once('baz.php'); // do some stuff foo ($bar); function foo($bar) { require_once('baz.php'); // do different stuff } ?> When foo is called, does it re-parse baz.php? Or does it rely on the already required file from the main php file (analagou...

Server side includes on app engine (<!-- include virtual="header.html" -->)?

Hi, I have been trying to figure this out a while. I would like to make my app engine website use basic html and shtml whenever in order to avoid the slow warm-up phase of jsp apps on app engine. This is so that my landing pages load instantly. Basically, I am trying to include an html file into my main html file (index.html - I tried ...

ASP.NET - Missing #includes cause compilation errors: Failed to map the path '...'

I have an ASP.NET application which features some server-side includes. For example: <!--#include virtual="/scripts.inc" --> These files are not present in my ASP.NET website project because my website starts in a virtual directory: /path-to-my-application When I choose Build Web Site, I get this error: Failed to map the pat...