Add http:// prefix to URL when missing

前端 未结 10 1236
谎友^
谎友^ 2020-11-30 06:41

Hello I have a very simple code


    
Website
10条回答
  •  感情败类
    2020-11-30 06:58

    Something like this?

    if (!strpos($aProfileInfo['Website'], 'http://')) {
        $aProfileInfo['Website'] = 'http://' . $aProfileInfo['Website'];
    }
    

提交回复
热议问题