次のコードによると、 PHP の$host_nameようなものexample.comが通知を返します:Message: Undefined index: hostしかし、PHP のような完全な URLhttp://example.comでは が返されますexample.com。FALSE と NULL を使用して if ステートメントを試しましたが、うまくいきませんでした。
$host_name = $this->input->post('host_name');
$parse = parse_url($host_name);
$parse_url = $parse['host'];
example.com を受け入れて返すようにスクリプトを変更するにはどうすればよいですか?