I´m not seeing any PHP echo

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

I´m not seeing any PHP echo

Postby alexandre_portugal » 06. May 2008 15:38

Hi!
I´ve installed Xampplite and it is working great: I´ve managed to set Drupal up in my machine.
But now I´m looking forward to learn the PHP basics, using some tutorials. The problem is that I do no see any PHP echo when looking at a webpage.

So I have:

<html>
<body>
this is html
<?
echo "this is PHP";
?>
</body>
</html>

I just see "this is html"

I tried this on two machines using Xampplite, but nothing. I mean, with IE6, nothing. With firefox I see: echo "this is PHP"; ?>

Is it something about the lite version?
Is there something I must change?

Thank you
alexandre_portugal
 
Posts: 4
Joined: 20. March 2008 11:17

Postby ifokkema » 08. May 2008 13:25

Hi,

How about looking at the page's source? I bet you see your PHP code right there. Change your <? tag to <?php. <? is not necessarily recognized; it's not the standard way of starting the PHP code and I do not recommend using it since it will not work everywhere (as you just found out) and it's only three characters shorter anyway.

Ivo
ifokkema
 
Posts: 56
Joined: 08. May 2008 13:05
Location: Leiden, Netherlands

Postby Wiedmann » 08. May 2008 13:39

I tried this on two machines using Xampplite, but nothing. I mean, with IE6, nothing. With firefox I see: echo "this is PHP"; ?>

Your file must have the extension "*.php".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests