ferrethouse Posted June 9, 2008 Share Posted June 9, 2008 Here is the source code... <? require_once 'configuration.inc.php'; require_once dirname(__FILE__).'/../framework_v5/framework.inc.php'; ... etc ... And when I do a "View Source" in the browser I get the same thing. I set up the php isapi extension in IIS. What am I missing? Quote Link to comment https://forums.phpfreaks.com/topic/109485-php-pages-not-being-rendered-properly-require_once/ Share on other sites More sharing options...
PFMaBiSmAd Posted June 10, 2008 Share Posted June 10, 2008 Always use full php opening tags <?php Quote Link to comment https://forums.phpfreaks.com/topic/109485-php-pages-not-being-rendered-properly-require_once/#findComment-561640 Share on other sites More sharing options...
ferrethouse Posted June 10, 2008 Author Share Posted June 10, 2008 Sorry - I was wrong in my initial post. Here is the source code for the index.php page... <?php require_once '../include.inc.php'; $newsQuery = Query::Construct( 'news_release'); $newsQuery->AddConstraint( 'status', new Equal('published')); $newsQuery->SetOrderBy('publish_date'); $toDate =date("Y")."-".date("m")."-".(date("d")+1); $fromDate =date('Y-m-d',mktime(0,0,0,date("m")-6,date('d'), date('y'))); $newsQuery->AddConstraint( 'publish_date', new GreaterThan($fromDate)); $newsQuery->AddConstraint( 'publish_date', new LessThan($toDate)); $entityList = $newsQuery->GetEntityList(); $latestNews = ""; foreach ($entityList->GetList() as $instance){ $id = $instance->Get('id'); $date = $instance->Get('publish_date'); $title = $instance->Get('title'); $latestNews.=Template('latest_news_item', array('date'=>$date, 'title'=>$title, 'id'=>$id)); } print Template('index',array ('latest_news'=>$latestNews)); ?> This page... require_once '../include.inc.php'; Contains... <? require_once 'configuration.inc.php'; require_once dirname(__FILE__).'/../framework_v5/framework.inc.php'; I don't have to include "php" in the included pages too do I? Quote Link to comment https://forums.phpfreaks.com/topic/109485-php-pages-not-being-rendered-properly-require_once/#findComment-561780 Share on other sites More sharing options...
ferrethouse Posted June 10, 2008 Author Share Posted June 10, 2008 I should also mention that the site worked fine on the old server (IIS 5.0) but I'm getting this behavior on the new server (IIS 6.0). I'm sure I haven't configured something correctly but I've tried everything I can think of. Quote Link to comment https://forums.phpfreaks.com/topic/109485-php-pages-not-being-rendered-properly-require_once/#findComment-561781 Share on other sites More sharing options...
PFMaBiSmAd Posted June 10, 2008 Share Posted June 10, 2008 When you do a view source in the browser, exactly what do you see? What part of the php code you have posted shows? Quote Link to comment https://forums.phpfreaks.com/topic/109485-php-pages-not-being-rendered-properly-require_once/#findComment-562092 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.