PHP code example of honglvshi / guangguang_bom

1. Go to this page and download the library: Download honglvshi/guangguang_bom library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

honglvshi / guangguang_bom example snippets


//check_extension 检测文件的后缀
//check_path检测的目录
$ret = new \GuangBom\Bom([
    "check_extension" => ['php'],   
    "check_path" => [__DIR__,__DIR__]
]);

//true 代表直接替换bom头 false 只查找 默认flase
$ret->find(true);