Archived Boards and Threads... > Parham's PHP Tutorials

Need SSI Help Please.

(1/2) > >>

Hi Everyone,

First off I"m NOT a coder and am not good at pretending to be. I appreciate any help someone could give me.

I am trying to add recent threads from smf to my webpage. I've followed the directions (as best I  could) from various boards and had no luck. Probably because I'm not doing it correctly.

Here is my website. Notice the red block about halfway down the page. That is the error I'm getting. [nofollow]

I've inserted the code for shtml type sites:

This is what I have above the head:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " [nonactive]">
<?php require("/path/to/forum/SSI.php"); ?>
<html xmlns=" [nonactive]">

This is what I have in the box called "Recent Forum Posts":

<!--#include virtual="./SSI.php?ssi_function=recentPosts" -->

Can someone tell me what I'm missing?

If you have SSI.php included in regular PHP at the top of the page, you don't need to use the SHTML declaration.

You should be able to just replace that <!--#include --> with:

--- Code: ---<?php ssi_recentPosts(); ?>
--- End code ---

OK...this is really strange. I did as you said and saved the file. When I FTP'ed it up to the server I got nothing. I looked at the source behind the page I had just uploaded and it didn't have any of the code in the page. I double checked the page to make sure it was saved in Dreamweaver and it was. I then deleted and uploaded again and still nothing. I'm going to upload the file here. Can someone take a look at it at tell me what I'm doing wrong please.

Thanks in advance.

That's a shtml page and unless you've got it set to parse php, what you have won't work.

Remove that php include statement at the top. Then where you want the recent posts to appear, remove the php line there and add the following:

<!--#include virtual="forum/SSI.php?ssi_function=recentPosts" -->

If this page isn't at the root of your site , then you'll need to change the path to SSI.php


Thanks so very much for the solution. It is working great. I'm not a programmer and truly don't pretend to be very well. It's great people like you that are helping broaden my knowledge. I appreciate your help.


[0] Message Index

[#] Next page

Go to full version