RE: PHP Page Refuse to Display PHP content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi, Max:

 I have modified my code so that the page is like this:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<h1>PHP Test</h1>
<p><b>An example of PHP in Action</b><br /></p>
<?php echo "hello world"; ?>

</body>
</html>

However, it is still not giving me anything.
Another odd thing is that I have added these lines to my httpd.conf file in the apache folder,

   AddType text/html php
   #AddOutputFilter INCLUDES .shtml
    AddType application/x-httpd-php-source phps

I still have no error message with the un-displayable content above, and therefore cannot call the phpinfo() page.
Could this be some other problems I have during the installation?

Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
ajwei@xxxxxxxxxxx
________________________________________
From: Max Thayer [mthayer@xxxxxxxxxxxxxxx]
Sent: Wednesday, June 11, 2008 1:56 PM
To: Wei, Alice J.
Subject: RE:  PHP Page Refuse to Display PHP content

This may be totally off base... but try <?php echo "hello world"; ?>

Max H. Thayer
Software Developer
Center for High-Throughput Structural Biology

Hauptman-Woodward Medical Research Inst.
700 Ellicott St.
Buffalo, NY 14203
Phone: 716-898-8637
Fax: 716-898-8660
http://www.chtsb.org
http://www.hwi.buffalo.edu

-----Original Message-----
From: Wei, Alice J. [mailto:ajwei@xxxxxxxxxxx]
Sent: Wednesday, June 11, 2008 1:44 PM
To: php-install@xxxxxxxxxxxxx
Subject:  PHP Page Refuse to Display PHP content

Hi,

   I am trying to install PHP so that I can connect to MS SQL from the
PHP scripts.
   I have successfully installed Apache and brings me back a good page
with no errors, and tried to create a php page in the
usr/local/apache/htdocs folder. Here is the code of what is in this
page:

<html>
<head>
<title>PHP Test</title>
</head>
<body>
<h1>PHP Test</h1>
<p><b>An example of PHP in Action</b><br /></p>
<? echo "Hello!";?>

</body>
</html>

The problem is that I do not see the execution of PHP anywhere on the
HTML. I have set the short_open_tag to off in the php.ini file, but I am
not sure what could be the problem that I could not see the execution of
the PHP page.

Can anyone please tell me what might have gone wrong?

Thanks for your help.

Alice
======================================================
Alice Wei
MIS 2009
School of Library and Information Science
Indiana University Bloomington
ajwei@xxxxxxxxxxx


[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux