News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Ok I'm stuck

Started by Thunderace, July 30, 2005, 04:40:50 PM

Previous topic - Next topic

Thunderace

I'm trying to add SSI includes to MySiteBuilder

index.php refers to the index.php of MysiteBuilder not SMF

However when I write it one way it works when I access directly index.php
It then doesn't work when I access the same page as index.php?&page=Home


<table width="128px"><tr>
<td class="boxes" valign="top">
<div class="headings" align="center">News</div><br /><p />
<div align="center">
<?php ssi_news(); ?>
</div><br /><p />
</td></tr></table>


Then the total opposite ..

When I write it the other way it fails when I access directly index.php
But works when I access the same page as index.php?&page=Home

<?php
echo
'
<table width="128px"><tr>
<td class="boxes" valign="top">
<div class="headings" align="center">News</div><br /><p />
<div align="center">'
;
ssi_news();
echo
'</div><br /><p />
</td></tr></table>'
;
?>


Error message ..

Fatal error: Unknown function: ssi_news() in /home/mysite/public_html/dir/file.php on line 37

Any ideas?

Damann

can you be a bit more specific about the scripts and how you have set up everything?


Damann

what do you want to use ssi_news() for and have you defined it?


Damann

that's why you get this error:
Fatal error: Unknown function: ssi_news() in /home/mysite/public_html/dir/file.php on line 37


Damann

try writing (in the first code) ssi_news() instead of ssi_news();


Thunderace

Seems to me that direct access to index.php:

Needs the HTML echo 'd and function ()

whereas index.php?&page=Home:

Needs no echo ' of the HTML but needs <?php function () ?>


Damann

I've tested it out on my server and I ALWAYS get that error message

Thunderace

The function that defines is on the first line of index.php and is the same for both examples

require("/home/mysite/public_html/smf/SSI.php");

Damann


kegobeer

QuoteFatal error: Unknown function: ssi_news() in /home/mysite/public_html/dir/file.php on line 37

Can you post file.php?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

Thunderace

This is solved .. thanks for your time guys, it was a bit late and ended up being a simple "settings" typo in MySiteBuilder.

Advertisement: