Jump to content


How can I enable php reading?


4 replies to this topic

#1 Minine

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 01 July 2006 - 07:38 PM

While developping my site, I came across a problem, my php codes don't seem to work as expected. ;)
I've tried opening my html files containing the php include code, but on all of my browsers (IE, Netscape, FF, Opera, etc) I get this:

Posted Image

And what I want is this:

Posted Image

Here's the html code for the page, quite small:

<html>
<head>
<title>Some Page</title>
</head>
<body marginwidth="0" marginheight="0" 
bgcolor="#FFFFFF" text="#FFFFFF"
font="impact" link="#00CCCC">
<center>
<table border="4" cellpadding="5" cellspacing="0" width="500px" 
align="center" bgcolor="#000000">
<tr>
<td bgcolor="#A3FF66" colspan="2"><h2>Title: Hello World!</h2></td>
</tr>
<tr height="480px">
<td valign="top">Navigation: <br /> 
<?php include ('part.php'); ?> 
</td>
<td valign="top">Content: <p>Hello world! Hello world! Hello world!</p></td>
</tr>
</table>
</center>
</body>
</html>

Can anyone tell how I can get my browsers to display php? Thanks.

Edited by Minine, 01 July 2006 - 07:40 PM.


#2 Matthew.

    Official Spammer .Matt

  • Members
  • PipPipPipPip
  • 2,749 posts
  • Gender:Male
  • Location:England

Posted 01 July 2006 - 07:41 PM

the file extension to use php must be *.php, i reckon you still have it as *.html?

ps. php is server side, so its not affected by browser type.

Edited by .Matt, 01 July 2006 - 07:42 PM.


#3 Net-Margin

    Young Padawan

  • Members
  • Pip
  • 55 posts
  • Location:United Kingdom
  • Interests:My main interests would have to be general computing and digital imaging; but I also enjoy Website Design and animation.<br /><br />Away from the computer I enjoy watching Science programs and astronomy.<br /><br />My main skills would have to be XHTML and Web Marketing but I also have good knowledge in CSS, Search Engine Optimization and Javascript.<br /><br />I own the Macromedia Studio 8 which I believe is one of the best packages ever. I also use Visual Basic 2005 Express Edition.

Posted 01 July 2006 - 10:24 PM

As .Matt pointed out, you will probably have made the mistake of leaving the page in which you are trying to use a PHP Include as a .html/.htm extension when it needs to be .php

You won't be able to view the results unless you have PHP installed on your PC I would suggest WAMP for that, but if you have a webhost then test it on there.

#4 Clandestine

    * Forum Police *

  • Members
  • PipPipPip
  • 833 posts
  • Gender:Male
  • Location:Redondo Beach, CA

Posted 01 July 2006 - 11:27 PM

I know this doesnt answer your question but their is a PHP help fourm just a couple catagorys down from this one. You will probably get more respones there.

hopes that helps hehe

;)

-Devyn

#5 Minine

    Young Padawan

  • Members
  • Pip
  • 9 posts

Posted 03 July 2006 - 11:14 PM

Okay, thanks for the info everyone. =)

By the way, I installed the WAMP server but still nada. I can't open any php extension files. How do I test them? :D

Edited by Minine, 05 July 2006 - 04:51 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users