php html create link from text

后端 未结 3 875
一整个雨季
一整个雨季 2020-12-10 10:03

I found a routine to create a html link when a link is found in a text

 

        
3条回答
  •  萌比男神i
    2020-12-10 10:36

    Your regex should include forward slashes in its character class for the end of the url:

    /(http\:\/\/[a-zA-Z0-9_\-\.\/]*?) /i
    

    That ought to do it.

提交回复
热议问题