Skip to content

Instantly share code, notes, and snippets.

@lizheming
Created February 17, 2011 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizheming/831342 to your computer and use it in GitHub Desktop.
Save lizheming/831342 to your computer and use it in GitHub Desktop.
/*我添加的自定义函数*/
function CKURL($url){
if($url=="")return "none";else
if(strlen($url)>50)return "none";else
if($url=="none")return "none";else
if(ereg("[a-zA-z]+://[^\s]*",$url))return $url;else
return "http://".$url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment