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");].
#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)
Code example:
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!