Jump to content

Conflicting PHP actions?


scferg

Recommended Posts

Hello, I'm having yet another issue with php...

 

I'm making a new version of my website and I've added some new features to it. Well, along with new features comes new problems. For my site's navigation, I use simple PHP. For example, to go to my contact page: http://mywebsite.com/?page=contact . http://mywebsite.com/index.php?page=contact works too.

 

Simple enough, right?

 

Well, I also have a SMF forum, and I've included the SSI example codes. I worked on the SSI first, and it was working fine...until I added m PHP nav code. (below)

 

<?php
if($section && $page) {include("./$section/$page"); }
elseif($page == "case1") {
echo "case1 goes here no page was written for this statement.";}
elseif($page) {include("./$page.html");}
else {$number=10; $only_active=TRUE; include("./news/show_news.php"); }
?>

 

And here's an example of one of my SSI codes:

<?php ssi_welcome(); ?>

 

I must also include this code into my page above the <html> tag:

<?php require("/home/MYWEBSITE/public_html/forum/SSI.php"); ?>

 

Once I added that code to my page...the page become completely blank. The SSI codes and my navigation code seems to be conflicting with each other. Because once I remove either one of them, it renders just fine. I can't change the SSI codes, but I can change my PHP navigation code. So is there any problem that's causing this issue within my nav code? Is there a better way of doing the same thing?

Link to comment
https://forums.phpfreaks.com/topic/86678-conflicting-php-actions/
Share on other sites

Oh wait....now that I tested something...there must be something of the same function. I tried going to a page other than the show_news.php (a simple html page) and it's just fine.

 

I think this is an even more serious problem than what I thought because...

1) I don't know PHP so I can't diagnose the problem

2) If/ when I do find the issue...I don't think I'll be able to change any of it without causing other problems on either the SSI on my forum, or the show_news.php on my CuteNews.

 

Any ideas?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.