if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",I('url'))) { $this->error("无效的 URL,请重新输入"); }
if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",I('url'))) { $this->error("无效的 URL,请重新输入"); }
转载于:https://www.cnblogs.com/zc290987034/p/9264810.html