How to remove bom header in php

王林
Release: 2023-03-01 19:10:01
Original
2643 people have browsed it

The way to remove the bom header in php is: it can be achieved through the ltrim() function. The ltrim() function can remove whitespace characters or other predefined characters on the left side of a string. Specific usage: [$con=ltrim($con,"\XEF\XBB\XBF");].

How to remove bom header in php

#PHP can use the ltrim() function to remove the BOM header.

ltrim() function can remove whitespace characters or other predefined characters on the left side of a string.

Grammar format:

ltrim(string,charlist)
Copy after login

Code example:

Copy after login

If you want to know more, please visit php Chinese website.

The above is the detailed content of How to remove bom header in php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!