Page 1 of 1

mypage.php does not display on localhost

PostPosted: 17. October 2009 18:55
by bob.furber
I have a php page that displays fine when served from our ISP, but it does not pull in the header.php file when served by XAMPP from localhost.

To keep the same appearance, we split our html files into a common header section, a CenterPanel section that changes for each file and a common footer section. We then wrap the header html code as follows:

<?
session_start();
extract($_SESSION);
?><html>
<head>
:

..and save it as header.php

The common end of the html file is saved as footer.php

And the CenterPanel, which changes from one page to another is sandwiched between php requires:

<? require_once('header.php'); ?>
<!-- Page specific html code goes here -->
:
<? require_once('footer.php'); ?>


Can anyone shed any light why XAMPP's PHP should behave differently from our ISP's PHP?

Thanks,

Bob Furber

Re: mypage.php does not display on localhost

PostPosted: 17. October 2009 19:19
by Nobbie
Replace "<?" by "<?php" or edit php.ini and set "short_open_tag = On".

By the way: this question has been asked at least 100 times in this forum - will you please answer the next guy asking the same thing? Thx in advance.