Google, 360 browser, QQ browser in the top of the page has a BOM header, Firefox browser display normal.
I tried a good variety of methods (dreamweaver,notepad++, the online search for the removal of the BOM program file), the final still can not solve, I would like to ask you the great God there is any way?
This is the part of the BOM that is displayed in Google Chrome:
Reply to discussion (solution)
The file itself has Chinese characters, and is saved directly as no BOM urf-8 encoding
The file itself has no kanji, and is saved directly as an ANSI code
From the multi-language version, the program files should not be written in a specific language. Instead, the content is filled in a dictionary at run time.
The file itself has Chinese characters, and is saved directly as no BOM urf-8 encoding
The file itself has no kanji, and is saved directly as an ANSI code
From the multi-language version, the program files should not be written in a specific language. Instead, the content is filled in a dictionary at run time.
I am using the editor to save the Utf-8 code without BOM, or not, but in Firefox browser is normal. Why is that?
Have all the relevant documents been done?
Not all browsers can ignore the BOM header
If NetBeans is installed, open the file with it,
If the file has a BOM header, the first line will show a small point, delete the dot, save it.
Have all the relevant documents been done?
Not all browsers can ignore the BOM header
This is my program.
"; }else{$dirname = $basedir. " /". $file; Checkdir ($dirname); }}} closedir ($DH); }} function Checkbom ($filename) {global $auto; $contents = file_get_contents ($filename); $charset [1] = substr ($contents , 0, 1); $charset [2] = substr ($contents, 1, 1); $charset [3] = substr ($contents, 2, 1); if (Ord ($charset [1]) = = 239 && ord ($charset [2]) = = 187 && ord ($charset [3]) = = 191) {if ($auto = = 1) {$re st = substr ($contents, 3); Rewrite ($filename, $rest); Return ("BOM found, automatically removed."); } else {return ("BOM found."); }} else return ("BOM not Found."); } function Rewrite ($filename, $data) {$filenum = fopen ($filename, "w"); Flock ($filenum, LOCK_EX); Fwrite ($filenum, $data); Fclose ($filenum); }
I can't use this to remove the BOM.
You this program is valid for deleting Utf-8 BOM
You can look at that.
$s = file_get_contents (' http://localhost '); Echo bin2hex ($s);
The first 20 characters of the output are posted
You this program is valid for deleting Utf-8 BOM
You can look at that.
$s = file_get_contents (' http://localhost '); Echo bin2hex ($s);
The first 20 characters of the output are posted
Is this code in the BOM program file or?
From your perspective, there are words.
This should be a Unicode BOM header, to determine if the first 2 characters of the file's internal code value is 255 and 254
That piece of code is now in a single program, executing
From your perspective, there are words.
This should be a Unicode BOM header, to determine if the first 2 characters of the file's internal code value is 255 and 254
Output starts with the first one
That piece of code is now in a single program, executing
This is done alone.
You #10 have 3 utf-8 BOM
There's no BOM in your #11.
You #10 have 3 utf-8 BOM
There's no BOM in your #11.
I can't read it, I solved it.
To remove the BOM from all first-off files
The location of your program is important, and you may also cite files outside the site.
To remove the BOM from all first-off files
The location of your program is important, and you may also cite files outside the site.
My BOM program is placed in the project root directory, and other files are fraternal relationships.
If you remove the BOM from the file in the project, and the BOM exists on the page
Then it means you're using a file other than the project.
If you remove the BOM from the file in the project, and the BOM exists on the page
Then it means you're using a file other than the project.
I'm looking for a big head, still can't find out, thank you
Then you put the BOM program on the root of the site to run
Then you put the BOM program on the root of the site to run
I suspect this is related to some JS, some of the website program files, are JS written
Do you think the JS file is not the relevant file?
Do you think the JS file is not the relevant file?
I just removed the JS code from the homepage of the website or not.
Do you think the JS file is not the relevant file?
Because this section of the JS path is hm.src = "//hm.baidu.com/hm.js?54403e32d263feb8a8a2d4a630ccc73f";
Mistakenly think it's about it.
Is your website on the public Internet? Post a URL to
Is your website on the public Internet? Post a URL to
http://www.25mj.com/
Has 3 BOM
Please post the index.php
Has 3 BOM
Please post the index.php
<title>[Oriental Mercure official website] China's leading decoration-building materials-Home Area e-commerce website, professional decoration building materials furniture consumption guide platform</title>
Welcome to Oriental Mercure Building Materials Lighting PlazaMember Login Member Registration Personal CenterHome looking for furniture find materials to find accessories home
Too long for me to separate, this is the first part
Has 3 BOM
Please post the index.php
A total of more than 60,000 bytes, you say which piece I paste out
$url = ' http://www.25mj.com/'; Echo Bin2Hex (File_get_contents ($url, false, NULL, 0,)), Php_eol;echo Bin2Hex (file_get_ Contents ($url. ' inc.php ', false, NULL, 0, 20));
efbbbfefbbbfefbbbf3c21444f43545950452048
Efbbbfefbbbf
Visit your index.php and return 3 BOM
Visit your inc.php and return 2 BOM
Obviously your index.php, inc.php, and a file in the include in inc.php have BOM
How do you perform your removal of the BOM program?
Or just put it on, no execution?
$url = ' http://www.25mj.com/'; Echo Bin2Hex (File_get_contents ($url, false, NULL, 0,)), Php_eol;echo Bin2Hex (file_get_ Contents ($url. ' inc.php ', false, NULL, 0, 20));
efbbbfefbbbfefbbbf3c21444f43545950452048
Efbbbfefbbbf
Visit your index.php and return 3 BOM
Visit your inc.php and return 2 BOM
Obviously your index.php, inc.php, and a file in the include in inc.php have BOM
How do you perform your removal of the BOM program?
Or just put it on, no execution?
My BOM program is executed here in http://www.25mj.com/delete_bom.php, this is the root directory.
$url = ' http://www.25mj.com/'; Echo Bin2Hex (File_get_contents ($url, false, NULL, 0,)), Php_eol;echo Bin2Hex (file_get_ Contents ($url. ' inc.php ', false, NULL, 0, 20));
efbbbfefbbbfefbbbf3c21444f43545950452048
Efbbbfefbbbf
Visit your index.php and return 3 BOM
Visit your inc.php and return 2 BOM
Obviously your index.php, inc.php, and a file in the include in inc.php have BOM
How do you perform your removal of the BOM program?
Or just put it on, no execution?
I execute the BOM program, the page does not show the BOM records to find index.php files, is not the BOM program executed index.php?
$url = ' http://www.25mj.com/'; Echo Bin2Hex (File_get_contents ($url, false, NULL, 0,)), Php_eol;echo Bin2Hex (file_get_ Contents ($url. ' inc.php ', false, NULL, 0, 20));
efbbbfefbbbfefbbbf3c21444f43545950452048
Efbbbfefbbbf
Visit your index.php and return 3 BOM
Visit your inc.php and return 2 BOM
Obviously your index.php, inc.php, and a file in the include in inc.php have BOM
How do you perform your removal of the BOM program?
Or just put it on, no execution?
Currently running the index.php display is like this
How did your program get on the server?
Can't you upload it locally after it's done?
$url = ' http://www.25mj.com/'; Echo Bin2Hex (File_get_contents ($url, false, NULL, 0,)), Php_eol;echo Bin2Hex (file_get_ Contents ($url. ' inc.php ', false, NULL, 0, 20));
efbbbfefbbbfefbbbf3c21444f43545950452048
Efbbbfefbbbf
Visit your index.php and return 3 BOM
Visit your inc.php and return 2 BOM
Obviously your index.php, inc.php, and a file in the include in inc.php have BOM
How do you perform your removal of the BOM program?
Or just put it on, no execution?
This shows that the BOM has been found and has been cleared, but there is a BOM running index.php.
The results of the operation are shown above.
How did your program get on the server?
Can't you upload it locally after it's done?
My program is changed on the server, my BOM program is also my FTP sent up, and then http://www.25mj.com/delete_bom.php run.
$url = ' http://www.25mj.com/';
Echo Bin2Hex (file_get_contents ($url. ' index.php '), Php_eol;
Can see 3 BOM
But your http://www.25mj.com/delete_bom.php report doesn't have this file! The index.php in the report are in subdirectories
You change the rewrite function in delete_bom.php to this:
function rewrite ($filename, $data) { if ($filenum = fopen ($filename, "w")) { if (flock ($filenum, LOCK_EX) ) { if (! fwrite ($filenum, $data)) echo "$filename write Failed
"; } else echo "$filename lock failed
"; Fclose ($filenum); } else echo "$filename Open failed
"; }
See if it's not rewritten successfully
You change the rewrite function in delete_bom.php to this:
function rewrite ($filename, $data) { if ($filenum = fopen ($filename, "w")) { if (flock ($filenum, lock_ex)) {
if (! fwrite ($filenum, $data)) echo "$filename write Failed
"; } else echo "$filename lock failed
"; Fclose ($filenum); } else echo "$filename Open failed
"; }
See if it's not rewritten successfully
After I change this, I run the BOM and it shows
In this way, the BOM is still in.
That's right! Files are not open, how to remove the BOM head?
You download the files that you can't open, and then you re-upload them.
That's right! Files are not open, how to remove the BOM head?
You download the files that you can't open, and then you re-upload them.
It's no wonder, Theo.
That's right! Files are not open, how to remove the BOM head?
You download the files that you can't open, and then you re-upload them.
What is this for? Don't I have enough permissions on the server?
The file is read-only, that's all.
Your file is not only under the management of the website, but also under the FTP management. This happens a lot.
Write permissions are actually controlled by FTP, you can try to modify the file permissions with the FTP client
Write permissions are actually controlled by FTP, you can try to modify the file permissions with the FTP client
Understand, thank you, finally solved.