Copy code The code is as follows:
if (!preg_match("/^(http|ftp):/", $_POST['url'])) {
$_POST['url'] = ' http://'.$_POST['url'];
}
The above introduces the http://www.12306.cn/mormhweb/k PHP preset http string function code for the URL address obtained by the form, including the content of http://www.12306.cn/mormhweb/k , I hope it will be helpful to friends who are interested in PHP tutorials.