Created
September 13, 2012 11:22
-
-
Save xdstack/3713666 to your computer and use it in GitHub Desktop.
PHP 自动将url转为超链接
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$url = "代码库 (https://gist.github.com/wdd2007)"; | |
$url = preg_replace("#http://([A-z0-9./-]+)#", '$0', $url); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment