Jump to content

wierd symbols with trying to use PHP includes


Lonig

Recommended Posts

Wierest thing for me...



is showing above every include I do... This doesnt happen on my other files on the same server, and it happens even if I try 2 techniques. Wierd thing is, it still includes the file, but also adds those wierd symbols.here is what I have tried:

<?php include("bannermiddle.php"); ?>

and

<?php include 'bannermiddle.php'; ?>

I normally use the 'filename' style, but in desperation tried the ("filename") route. Both give same problems. Here is the code that is surrounding it. I've editted all other text and have narrowed it down to be something between these lines.

			</div>						<?php include ("news.php"); ?>						<div style="width:470px;margin-left:auto;margin-right:auto;">

The include file itself doesn't seem to matter, as I tried including a blank php file and it still gives the



Any ideas would be appreciated.

Link to comment
Share on other sites

Has your PHP installation always done this? Have you made any recent changes to your server, particularly around the time this started?You might try the other three include statements: require, include_once, require_once.EDIT: And if you do find out why it's doing that, please be sure to post it at http://php.net/include.

Link to comment
Share on other sites

Shall try them now.And no, only this folder seems to have the problem. I run through GoDaddy and all my other sites(running in subfolders) work fine, except this one subfolder. I tried making a new one and no go.... Just seems real strange that the others still work fine. Guess I'll send an email to GoDaddy too while I try the other commands you suggested. Maybe they did something to new folders (which I dont think is even possible if other folders work and no .php files in each one)

Link to comment
Share on other sites

Does GoDaddy provide your server? It doesn't seem like they could influence the effect of an include statement otherwise...The new folder you made didn't exhibit the bug?Do you know approx. when this started?

Link to comment
Share on other sites

I think you'll find this has nothing to do with php, but the charset setting in the head of each page.Try replacing your current one with this<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Link to comment
Share on other sites

Try adding the appropriate HTTP header with PHP's header() function, i.e.

<?phpheader('Content-type: text/html; charset=utf-8');?>

You should also open and resave your files in an editor other than Notepad. In that other editor, make sure you save the file as "UTF-8" WITHOUT a BOM.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...