1

Topic: Incorrect page display from a php-script.

Incorrect page display from a php-script.
Good afternoon!
File/content/document/eis.php in coding UCS-2 Little Endian (unicode) from a php-script
It is displayed not correctly, entering into a browser so:
http://10.1.2.39/content/document/eis.php
Here file contents:

--------------------------begin - eis.php---------------------------------
<?
require ($ _SERVER ["DOCUMENT_ROOT"]. "/bitrix/header.php");
$APPLICATION-> SetTitle ("Firm Projects");
?> <div class = "shadow">
<div class = "info_caption"> the List of the automated systems (Projects) of Firm and the employees responsible for their administration (the Order No 684-aa-18) </div>
<div class = "info_msg"> <? include $ _SERVER ["DOCUMENT_ROOT"]. "/content/document/files/eis4.html";?> </div>
</div>
<? require ($ _SERVER ["DOCUMENT_ROOT"]. "/bitrix/footer.php");?>
--------------------------end--- eis.php---------------------------------

And if directly from a browser it is displayed correctly.
http://10.1.2.39/content/document/files/eis4.html
How it is necessary to adjust PHP that it was displayed correctly from a PHP-script?
It is impossible to change the file coding.
Yours faithfully. Boris.

2

Re: Incorrect page display from a php-script.

korbnik wrote:

it is impossible to change the file Coding.

iconv ()
Not?
Well if not, then in header () to specify the necessary coding. If that-thread another it not , certainly.

3

Re: Incorrect page display from a php-script.

vkle wrote:

it is passed...
iconv ()
Not?
Well if not, then in header () to specify the necessary coding. If that-thread another it not , certainly.

And where it to specify? In a php-script file eis.php?
If it is not difficult, can specify where in the script?
I in php not so.
Thankful in advance. Boris.

4

Re: Incorrect page display from a php-script.

If iconv () to use, a file it is necessary to read,  the coding in approaching, to save result in a file under other name, and already it . A variant simple and clear, but not optimal on productivity - superfluous reversal to  on record (for a small file not terribly, for big it can be noticeable).
Or not to save and not , and at once to deduce result through echo (I not in course, whether coincide it with  a paradigm , at them still those cockroaches).
Probably, there are other variants, only, without understanding precisely action of all this thingummy, difficult to tell more precisely.
with header () it is pleasant to me less. It is possible to try somewhere in the most-very first lines to write

header ("Content-Type: text/html; charset=_");

However, it affects all web page as a whole that demands in advance  in the coding of a put file a remaining content of page.
Probably, at  there are decisions or recommendations in this respect.

5

Re: Incorrect page display from a php-script.

After.
I think, if such variant approaches, it is possible to manage exceptional HTML th means.
Inside <div> or instead of it c <iframe> where in quality src to specify the link to a html-file. It in itself normally opens in the browser.

6

Re: Incorrect page display from a php-script.

vkle;
That, 5.3.8 all is interesting in old version PHP normally, and in new version PHP 7.0.27 it is abnormal.

7

Re: Incorrect page display from a php-script.

korbnik wrote:

That, 5.3.8 all is interesting in old version PHP normally, and in new version PHP 7.0.27 it is abnormal.

it is possible, it somehow with  scripts is connected. With this question I will not help, for, did not pick it at such level.
Generally, eccentricities everyones meet. Far not to run, only yesterday transferred a site from one server on another. On initial the version  5.3, on target from 5.5 and above,  5.6. After transfer the engine began to give for some reason in  the wrong coding only on one page a site, on remaining - as it is necessary. Replaced the version with 5.6 on 5.5 - and this page earned. Here also explain,  there the dog rummaged.
Now on a subject. Still a method, I sound.
The source file in the initial coding is put in any certain folder under the given name. At reversal to page presence of this file is checked. If the file is, it is read, will be recoded in the necessary coding and saved in other folder (or in the same, but under other name). The source file is deleted (there is no file - pass code conversion). Well and  always only a corrected copy.