Re: [請益] http:// 自動轉成網址
※ 引述《hate5566 (黑特56)》之銘言:
: 請問一下 在表單內的文字內容
: 若出現 http://xxx.xxx.xxx.xx
: 要如何自動將它轉換成網址呢?
'/^(((http|https|ftp):\/\/)?([[a-zA-Z0-9]\-\.])+(\.)([[a-zA-Z0-9]]){2,4}
([[a-zA-Z0-9]\/+=%&_\.~?\-]*))*$/'
參考網站:
37 Tested PHP, Perl, and JavaScript Regular Expressions
http://tinyurl.com/lsd59j 裡面還有很多可以用的
http://tw.php.net/manual/en/function.preg-replace.php
--
AppleBoy Blog: http://blog.wu-boy.com
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 115.43.14.208
推
10/03 18:28, , 1F
10/03 18:28, 1F
→
10/04 00:55, , 2F
10/04 00:55, 2F
推
10/04 01:29, , 3F
10/04 01:29, 3F
推
10/04 08:08, , 4F
10/04 08:08, 4F
推
10/04 08:22, , 5F
10/04 08:22, 5F
推
10/04 10:21, , 6F
10/04 10:21, 6F
→
10/04 11:52, , 7F
10/04 11:52, 7F
推
10/04 11:58, , 8F
10/04 11:58, 8F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章