php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #80597 funzione include e require
Submitted: 2021-01-06 12:38 UTC Modified: 2021-01-06 15:03 UTC
From: spagoreu at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: *General Issues
PHP Version: 7.4.14RC1 OS: php
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: spagoreu at gmail dot com
New email:
PHP Version: OS:

 

 [2021-01-06 12:38 UTC] spagoreu at gmail dot com
Description:
------------
I use include to include html parts in the page.
The function adds an invisible character in the head portion (from a check it looks like an ascii code (63) which actually graphically lowers .
I don't know how many pixels lower than the code without the function include...
To be clearer (I'm Italian and I may not be able to explain myself correctly) in the code I include there is an html page header div (which I use for each page).
If I use that code directly on the php page the display is correct, but if I include it with the include or require function from another page, the div is about twenty pixels lower.
Analyzing the code, an ascii character (63) is in the head which is not actually present.

Test script:
---------------
<body>
<?php include_once 'HtmlPage.inc'; ?>
</body>
.......................................................
HtmlPage.inc:
<div style="width: 300px; height: 400px; background-color: #FF6666;">Intestazione</div>
====================================================================
rispetto a:
<body>
  <div style="width: 300px; height: 400px; background-color: #FF6666;">Intestazione</div>
</body>



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-06 12:49 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2021-01-06 12:49 UTC] cmb@php.net
This is most likely a BOM in the included file, which is rendered
as replacement character[1].

[1] <https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character>
 [2021-01-06 14:40 UTC] spagoreu at gmail dot com
yes, but how can I solve the problem?
This one I posted is a simple instruction, with correct html code, so there is no mistake.
How can I fix it so it doesn't return that extra character?
 [2021-01-06 14:44 UTC] rtrtrtrtrt at dfdfdfdf dot dfd
by using a proper editor which displays such things or by configure your used one to *not* add a BOM - it's that easy and has nothing to do with PHP

for decades existing problem caused by bad text editors
 [2021-01-06 15:03 UTC] cmb@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.
 [2021-01-06 15:08 UTC] spagoreu at gmail dot com
Ok, I'm sorry.
Thank you
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 10:00:01 2026 UTC