By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,342 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

<?php ...... ?> ignored? What's wrong???

P: n/a
When I try to display a web page with php embedded, the <%php .. %> part
is completely ignored, so it seems.

For example, the next code yields a blank page when displayed in a browser:

<html>
<head>
<title>Test</title>
</head>
<body>
<h1>
<?php
$today = date("l");
print("Hello: it's $today" );
?>
</h1>
</body>
</html>
Running this program from the command line (php <filename>) yields a
correctly expanded stream of data.

My guess is that is has something todo with the configuration of the
(Apache) server. But what??????
===
Apache/1.3.28 (Linux/SuSE) PHP/4.3.3 mod_perl/1.28 configured --
===

Thanks in advance

Bertwim
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Me
How are you loading the page? Is it on the local server?
If yes, then specify...
http:/localhost/htdoc/page.php

If you're opening the file from the local filesystem you're getting:
http:///directory/page.php

PHP won't be interpreted.

hth
On Sat, 03 Jul 2004 02:23:17 +0200, B.W.H. van Beest wrote:
When I try to display a web page with php embedded, the <%php .. %> part
is completely ignored, so it seems.

For example, the next code yields a blank page when displayed in a browser:

<html>
<head>
<title>Test</title>
</head>
<body>
<h1>
<?php
$today = date("l");
print("Hello: it's $today" );
?>
</h1>
</body>
</html>
Running this program from the command line (php <filename>) yields a
correctly expanded stream of data.

My guess is that is has something todo with the configuration of the
(Apache) server. But what??????
===
Apache/1.3.28 (Linux/SuSE) PHP/4.3.3 mod_perl/1.28 configured --
===

Thanks in advance

Bertwim


Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.