General Community > Scripting Help

Can't get SSI to work :(

(1/2) > >>

Grudge:
Hey,

I've searched and read for the past hour trying to figure this out so I am completly lost as to what could be wrong so I post here :)

I've been trying to get SSI to work so that on my main index page for the site it will show the most recent posts. ssi_examples.php works absolutly FINE for me and everything comes up as it should.

I've added the require line to the very top of the document and the php line where I want the data. I don't get ANY error messages at all - I just get nothing. Absolutly nothing at all. Could there be anything I have to enable on my server? I already have the server set up the parse the files as SSI. Below is the code I am using in the html file:

--- Code: ---<?php require("./yabbse/SSI.php"); ?>

<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<!--#include virtual="titlebar.htm" -->
<?php phpinfo(); ?>
Newest threads:
<?php "latestMember();" ?>

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<!--#include file="nphp/news.txt" -->
</table>


<!--#include virtual="footer.htm" -->
</HEAD></HTML>
--- End code ---

The other includes are just the some HTML inserts. Also - I have set up my path corrently in SSI.php (Although I tried just . first and that also had no effect).

۞:
The problem is, that you're using PHP on an SSI page. Which I believe does not work. Its best to stick to one or the other. for example


--- Code: ---<?php require("./yabbse/SSI.php"); ?>

<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<?php include("titlebar.htm"); ?>
<?php phpinfo(); ?>
Newest threads:
<?php "latestMember();" ?>

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<?php include("./nphp/news.txt"); ?>
</table>


<?php include("footer.htm"); ?>
</HEAD></HTML>
--- End code ---

And save it with a php extension, not shtml. If you want to use SSI instead of php, post here, and i'll show you how to do that.

Grudge:
Hey!! Thanks a lot for the reply! I haven't got time to test it now as I'm on my way to bed! I would prefer to save it as an shtml file if it's possible... If you could show me how to do it the other way I'd be very grateful. If not I'll try the other way tomorrow anyway!!!

Many Thanks!!

[Unknown]:
Do you use apache or IIS?

You can use shtml, just look at ssi_examples.shtml.

-[Unknown]

۞:
Heres, how to do it with SSI:


--- Code: ---<HTML><HEAD>
<TITLE>P0stWh0re.com - For All Your P0stWh0ring Needs</TITLE>
<STYLE type="text/css">
.windowbg
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #020A40;
  }
.windowbg2
  {
    font-size: 11px;
    color: #FFFFFF;
    border-color: #000000;
    font-family: verdana, arial, helvetica, serif;
    background-color: #05074D;
  }
.catbg
  {
    font-weight: bold;
    font-size: 13px;
    border-color: #000000;
    background-color: #C07018;
    color: #FFFFFF;
  }
</STYLE>
<!--#include virtual="titlebar.htm" -->
Newest threads:
<!--#include virtual="SSI.php?function=latestMember" -->

<table width="100%" align="left" class="windowbg" bgcolor="windowbg" cellpadding="1" cellspacing="5">
<!--#include file="nphp/news.txt" -->
</table>


<!--#include virtual="footer.htm" -->
</HEAD></HTML>
--- End code ---

take a look at http://www.yabbse.org/community/ssi_examples.shtml for more info :)

Navigation

[0] Message Index

[#] Next page

Go to full version