mypage.php does not display on localhost

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mypage.php does not display on localhost

Postby bob.furber » 17. October 2009 18:55

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
bob.furber
 
Posts: 7
Joined: 09. October 2009 21:17

Re: mypage.php does not display on localhost

Postby Nobbie » 17. October 2009 19:19

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.
Nobbie
 
Posts: 8770
Joined: 09. March 2008 13:04


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 65 guests