Jump to content

XML File has funny characters due to includes


Thread7

Recommended Posts

Every time I include and external file I get a single dot in my file output.  This is screwing up my XML output.  Here is a test I put together to illustrate what is happening.

---------These next 5 lines are in a file called test.php---------

<?php

include("c:/inetpub/wwwroot/includes/x.php");

echo "<Modules>";

echo "</Modules>";

?>

 

---------These next 4 lines are in a file called x.php in the includes directory ---------

<?php

$x=1;

$x++;

?>

 

---------When I view source in IE I notice there is a dot/bullet point at the start of the output------

---- I think it is some sort of unicode character.  If I include 5 files, I get 5 of these dots -----

.<Modules></Modules>

 

 

Any ideas?

 

Thanks,

 

Thread7

 

I don't think I have enough information to fully help you here but have you thought about using include_once instead of include

 

Trust me that is a dumb response to consider but we are dealing with Internet Explorer here Microsoft does some really messed up things.

 

Does this still happen in FireFox?

 

I don't see any issues in your code but double check for the period in your include files or post more of your code.

It isn't IE.  I have problems in Firefox too.  I am really trying to get my Flash app to read it and Flash has trouble with it as well.

include_once gave me the same issue.

 

I am quite convinced that there are no funny characters inside the include files.  Heck, I create a new blank include file and it still gives me the problem.  Basically, once dot per include statement.

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.