$url = 'https://www.baidu.com/'; if(preg_match('/^http(s)?:\\/\\/.+/',$url)) { echo '带'; }else { echo '不带'; } 相关文章: 2022-12-23 2021-12-08 2022-12-23 2022-12-23 2021-10-26 2022-02-07 2022-12-23