php files not displaying html correctly
Hi there,
I am fairly new to php but I did have something working beforehand but
now I can't get my html in php files to display correctly and I
wondered if someone could point me in the right direction to where my
problem lies.
I have an application that I use to generate my website using tags
within the html selected from a database what needs to be displayed
where the tag is.
e.g. the application would substitute [book_title] as it parses the
file with the actual title of the book.
The problem I think I have is that my website pages have php embedded
in them and the way I got this to work was instead of having the files
..htm, they were renamed to php so that they would be parsed by the web
server's php parser.
What seems to be happening is that the files look ok on my local
machine but if I view them on the web (or even view the source) they
are only half completed and in some cases hardly anything is in the
file. I can only assume that maybe the php is causing a problem here?
If I run the php files through my php debugger, the html that it
displays is correctly formatted so I can't understand why the web
server is having such a big problem.
The version of php I have on my local machine is 4.3.4. Apache is
running version 1.3.28.
Am I going about things the wrong way..? A sample of my php file that
gets uploaded to the web server is:
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<title>Back to Salem</title>
<meta name="description" content="Back to Salem by author Alex
Marcoux.">
<link rel="stylesheet" href="../../shared/style.css">
<meta name="Microsoft Border" content="tlb, default">
</head>
<body leftmargin="3">
Book synopsis goes here....
<?php
include("http://www.website.com/review/review_insert.php?item_id=169");
?>
</body>
</html>
This file would have a php extension so it would be treated as php and
parsed.
I'd be greatful of any tips as I can't see what I am doing wrong
here...
Thanks,
Emma
|