Page 1 of 1

PHP does not show HTML correct

Posted: Wed Sep 17, 2008 2:39 pm
by mike2008i
Hello,

at first i am newby in php-programming. I also have knowledge and experience in C/C++ and
XHTML, CSS. Now i want to programm server apss with php and using the db mysql.

I met the following problem:
when was testing at first time the test.php script which contains the following code,

Code: Select all

 
... 
<body>
     <?php
        echo "<p>The PHP Code</p>\n";
      ?>
</body>
...
 
i got this HTML-Site

Code: Select all

The PHP Code\n"; ?>
Even if i test with the phpinfo() instead of echo function i got an empty site.
I have set up the apache server correct because i got the welcome message.
I have also installed and configured the php5 module.
The language was set in the browser and script to utf-8.

Can somebody help me?

Thx

Re: PHP does not show HTML correct

Posted: Wed Sep 17, 2008 4:34 pm
by thinsoldier
If you get an empty page with phpinfo() then I think you're server isn't actually processing php.
If you're not very familiar with apache+php etc.. I'd suggesting using an all-in-on package like wamp, mapm, or universal server etc...
With those there's nothing for you to "set up". Just execute 1 file and you've got your apache server+php, & mysql server running automagically. (Universal Server even creates a virtual W:\ drive. Just drop your sites into W:/www/ and access them with http://localhost/sitefolder/)