strange characters appear on php page

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
endortrails
Forum Newbie
Posts: 3
Joined: Wed Aug 03, 2005 10:55 am
Location: kansas

strange characters appear on php page

Post by endortrails »

howdy yall

I have a simple PHP include that pulls my navigation bar links. Here's the page:

http://www.thadallender.com/flashtest/

Notice the two question marks on the top of the page. Why in the hell are they there? When you view the source code and looks at the transitional tags at the top, this appears:

Ôªø<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<A href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/CODE">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Here's my PHP:

<?php include ("http://www.thadallender.com/blog/main_nav.php"); ?>

Any ideas?

Thad
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

You are doing other stuff too (which your are not showing in this message) because i can't reproduce the problem...
endortrails
Forum Newbie
Posts: 3
Joined: Wed Aug 03, 2005 10:55 am
Location: kansas

Post by endortrails »

Here is all the code from the page:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Thad Allender Photography</title>

<script type="text/javascript" src="flashobject.js"></script>

<script type="text/javascript">

	window.onload = function() {

		if ((window.document.getElementById) && (window.document.getElementById('gallery').focus)) {

			window.document.getElementById('gallery').focus();

		}

	}

</script>

<link rel="stylesheet" href="http://www.thadallender.com/blog/styles-site.css" type="text/css" />

</head>

<body>

<div id="container">
<div id="wrapper">
<div id="contents">

<div id="bannertop"></div>

<?php include ("http://www.thadallender.com/blog/main_nav.php"); ?>

<div style="display:none">

	<div>#F0F0F0</div>

	<div>#FFFFFF</div>

	<div>#000000</div>

	<div>#787879</div>

	<div>#7E7D7E</div>

	<div>#7B7B7B</div>

	

	<div>.jpg</div>

	<div></div>

	<div></div>

	<div></div>

	<div></div>

</div>



<div id="flashcontent">

	<script type="text/javascript">

		// <![CDATA[

		

		var myFlashObject = new FlashObject("gallery.swf", "gallery", "100%", "100%", 6, "#ffffff");

		myFlashObject.addParam("scale", "noscale");

		myFlashObject.addVariable("request", getQueryParamValue("image"));

		myFlashObject.addVariable("photosXmlFile", "photos.xml");

		myFlashObject.addVariable("configXmlFile", "galleryconfig.xml");

		myFlashObject.write();

		

		// ]]>

	</script>

	

	<noscript>

	You must enable Javascript to view this content.

	</noscript>

</div>
</div>
</div>
</div>

</body>

</html>
Thad
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

I've copy-pasted the code, and still can't reproduce the error.

here is a screenshot:
http://timvw.madoka.be/images/thad.png
endortrails
Forum Newbie
Posts: 3
Joined: Wed Aug 03, 2005 10:55 am
Location: kansas

mac problem

Post by endortrails »

I'm on a mac....perhaps it's just a mac thing? did the flash gallery load on your page?
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

No, but that is understandable.. the javascript generates uses relative paths to load the flash stuff, and http://test/gallyer.swf etc doesn't exist overhere :)
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

I'm seeing the question marks too. My only guess is that there are some chopped up ascii characters at the beginning of your page. Copy all but the doctype declaration into a new page, manually re-type in the doctype declaration and see what happens then.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

come on people.. posting in the general forum with this isn't cool. :?

Moved to PHP - Code
Post Reply