Skip to main content
October 8, 2012
Question

Server Side Includes

Hello,

I have setup a few Server-Side includes on various pages, but when I come to placing 2 Server Side Includes onto one page it won't allow me to do so. I am linking into files within another file but under the same domain name, here is the PHP coding I am using to do link each server side in <?php require_once('quote/rss2html.php'); ?>

can someone please help me with this?

This topic is closed to new replies. Start a new post to keep the conversation going.

6 replies

David_Powers
Inspiring
October 8, 2012

AMant201 wrote:

here is the PHP coding I am using to do link each server side in <?php require_once('quote/rss2html.php'); ?>

Take a closer look at your code. You're using require_once(), which allows the include file to be included once and once only. If you want to include the file more than once on a page, you need to use either include() or require().

<?php require('quote/rss2html.php'); ?>

Translate
October 8, 2012

Hello,

Thank you for your reply, I have tried this method and it doesn't seem to work. If you go to this page http://www.test.hdwebdesigns.co.uk/MPM/blog.php   I just need to echo the titles on that page really. That may make it easier

Thanks

Ash

Translate
David_Powers
Inspiring
October 8, 2012

All the web page shows is the HTML output, so it's hard to tell what's happening. However, looking at the HTML source code, I can see two comments that say the HTML was generated by rss2html.php, but it's not clear whether they're in your original script or whether they have been generated by the include file.

Since you're using a commercial script, it might be a good idea to get back to the company you licensed it from if it's not working as expected.

Translate