Home > Article > Backend Development > http://www.12306.cn/mormhweb/k The URL address obtained by PHP for the form is preset http string function code
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.