Req #80597 [Com]: funzione include e require

From: Date: Wed, 06 Jan 2021 14:44:43 +0000
Subject: Req #80597 [Com]: funzione include e require
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231405@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80597&edit=1

 ID:                 80597
 Comment by:         rtrtrtrtrt at dfdfdfdf dot dfd
 Reported by:        spagoreu at gmail dot com
 Summary:            funzione include e require
 Status:             Not a bug
 Type:               Feature/Change Request
 Package:            *General Issues
 Operating System:   php
 PHP Version:        7.4.14RC1
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

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


Previous Comments:
------------------------------------------------------------------------
[2021-01-06 14:40:20] 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 12:49:48] 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 12:38:07] 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>




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=80597&edit=1


Thread (6 messages)

« previous php.bugs (#231405) next »