PHP automatically identifies links in text

time:15-07-29 forum:PHP tools and code
  [code]function text2links ($str='') {
if (! Preg_match (' / (http|www\.|@) /i', $str) {return $str; .quot; \\1http://www..Quot; $l);

$l = preg_replace (.#91; \t.#93; \t.#93;) ftp\./i.quot; Lace (.Quot; / (https:\/\/.#91; ^)!.#93;) /i.quot;.Quot;.Lt; a href=\.quot; \\1\.quot;.Gt; \\1.lt. _.#93; (\..#91; _a-z0-9-.#93;.#91; a-z0-9-.#93; \..#91; a-z0-9-.#93;)) /i.quot;.Quot;.Lt; a href=\.quot.

prev:PHP determines whether or not the user i... next:Ji'nan apartment endowment status: many ...
post comment
Notice



approved   The couple made tea by hand in deep ...   What day can "star children" be inte...   Ji'nan Qianfo Hill Xingguo monastery...   2017 SONY children's life is a conce...   Massaging the acupoints can relieve ...
rand   PHP regularly gets the picture and d...   PHP completely filters HTML, JS, CSS...   The UBB label turns the PHP function...   PHP implements HTML code to UBB Tags   PHP intercepts the class and instanc...
ads

other

Because all the contents of this site are reproduced from other media, the intention is to provide free services to the public, but it does not mean that this site agrees with its views, and can not be responsible for the authenticity of its verification, such as the copyright unit or individual of the manuscript does not want to publish on this site, please Contact me, I will immediately remove it, thank you. Contact: atseashawk@163.com