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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

I think I figured it out.  I was using EditPad Lite to create my PHP files.  When I use straight Notepad I don't get this problem.  In EditPad I then saved the files as ISO-8859 and it pretty much cleared up.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.