The Most Active and Friendliest
Affiliate Marketing Community Online!

“Adavice”/  “1Win

Php

bungo

New Member
affiliate
Does this PHP file look ok to everyone?
It just displays a blank page when I test it, and I can't see what's wrong with it.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1"><title>bungo.co.uk</title>


<link href="style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- Navigation -->
<p><?php
include ("head.php");
?></p>


<!-- Content -->
<p><?php
include ("index_c.php");
?></p>


<!-- Footer -->
<p><?php
include ("footer.php");
?></p>

</body></html>


Hope somebody can help!
Bungo
 
The includes are just standard html files, there's nothing fancy about them - just the usual CSS and JavaScript.

I've made a few changes, but I'm in the process of changing web-hosts at the moment so I can't upload anything for an hour or two.

Is there a way to test PHP files locally, with PHP being a ServerSide language?

Bungo
 
Yes of course:
I'll document this somewhere later but in the meantime (I am guessing you are using XP pro, but its almost same regardless).
To test PHP locally on a windows machine:
Testing server side languages (ASP/PHP) in windows is quite easy. Users not using XP pro may have some difficulty with IIS so if you then let me know and I will do a quick apache tutorial.


IIS:
First of all, you need to install a webserver, the windows webserver is called Internet Information Services (IIS).
Go to Control Panel > Add/Remove programs
Select the 'Add/Remove Windows components' tab
(this will take a short time to load)
Scroll down until you see the Internet Information services label and select the checkbox
You will be prompted to enter your windows cd (this must be a retail CD and not an image provided by some OEM retailers).

Follow the installer until completion (I wont type all this at this time as I am trying to type quickly to give you the essential info).

Next, head over to http://uk2.php.net/get/php-5.0.4-installer.exe/from/a/mirror
This is a php installer binary provided by PHP.

The installer will config your IIS for you.

Place all testing files into c:\inetpub\wwroot\

View http://localhost/index.php to see your index file (or http://localhost/ for root)

If any of this causes you problems, let me know what they are and I will give you another solution.

Lewis
 
bungo said:
The includes are just standard html files, there's nothing fancy about them - just the usual CSS and JavaScript.

I've made a few changes, but I'm in the process of changing web-hosts at the moment so I can't upload anything for an hour or two.

Is there a way to test PHP files locally, with PHP being a ServerSide language?

Bungo


Is this top secret stuff? If not, if you want to zip it and send it to me at
lcameron[at]stealthhosts[dot]com
I'll load it locally and see if there is anything obviously wrong.
 
I think I found the problem, but thanks a lot for the fast replies.

The include files all had the <html>, <head> and <body> tags, so I think the browsers were just getting confused.

I'm using XP Home, so I'll try out the local server thingy and let you know how it goes.

Ta muchly,
Bungo
 
bungo said:
I think I found the problem, but thanks a lot for the fast replies.

The include files all had the <html>, <head> and <body> tags, so I think the browsers were just getting confused.

I'm using XP Home, so I'll try out the local server thingy and let you know how it goes.

Ta muchly,
Bungo

Yeah, thats what made me ask what was in your includes. It's a common error when using something like dreamweaver/frontpage for development. It auto-adds things that you may not want.

You can have multiple head and body tags (though not advisable) multiple html tags tend to confuse things.

Your root code was fine because as I said before, it included my files without problem.

Glad you got it sorted
 
banners
Back